Skip to content

Commit

Permalink
Merge pull request #2446 from andreasRu/patch-5
Browse files Browse the repository at this point in the history
Fix options of Datasource in services.datasource.create.cfm footer se…
  • Loading branch information
michaeloffner authored Nov 26, 2024
2 parents b5b92ed + a734cff commit 3b74e59
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ if(isNumeric(datasource.connectionLimit))optional.append('connectionLimit:#datas
if(datasource.connectionTimeout NEQ 1)optional.append('connectionTimeout:#datasource.connectionTimeout# // default: 1; unit: minutes');
if(isNumeric(datasource.liveTimeout) && datasource.liveTimeout>0)optional.append('liveTimeout:#datasource.liveTimeout# // default: -1; unit: minutes');
if(datasource.metaCacheTimeout NEQ 60000)optional.append(',metaCacheTimeout:#datasource.metaCacheTimeout# // default: 60000; unit: milliseconds');
if(len(datasource.timezone))optional.append("timezone:'#replace(datasource.timezone,"'","''","all")#'");
if(len(datasource.timezone))optional.append("timezone:'#replace(datasource.timezone,"'","''","all")#' // default is same as lucee instance");
if(datasource.storage) optional.append('storage:#datasource.storage# // default: false');
if(datasource.readOnly) optional.append('readOnly:#datasource.readOnly# // default: false');
if(!isNull(driver.literalTimestampWithTSOffset) && driver.literalTimestampWithTSOffset())
Expand All @@ -627,7 +627,8 @@ this.datasources["#datasource.name#"] = {
password: "#datasource.passwordEncrypted#",<cfif optional.len()>

// optional settings
<cfloop array="#optional#" index="i" item="value">#replace(value, " // default", ", // default")#<cfif i LT optional.len()>
<cfloop array="#optional#" index="i" item="value"><cfif i LT optional.len()>#replace(value, " // default", ", // default")#
<cfelse>#value#
</cfif></cfloop></cfif>
};
</cfsavecontent>
Expand All @@ -636,4 +637,4 @@ this.datasources["#datasource.name#"] = {


</cfif>
</cfoutput>
</cfoutput>

0 comments on commit 3b74e59

Please sign in to comment.