Skip to content

Commit

Permalink
Merge branch 'main' into patch/upsert-raw-return-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete authored Sep 11, 2024
2 parents 9f3a7b2 + ee1bc72 commit 373ce21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions models/Query/QueryUtils.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ component singleton displayname="QueryUtils" accessors="true" {
return arguments.value.getBindings();
}

var binding = "";
var binding = {};
if ( isStruct( value ) ) {
if ( structKeyExists( value, "isExpression" ) && value.isExpression == true ) {
return value;
Expand All @@ -103,7 +103,10 @@ component singleton displayname="QueryUtils" accessors="true" {
binding = { value: normalizeSqlValue( value ) };
}

structAppend( binding, { cfsqltype: inferSqlType( binding.value ), list: false, null: false }, false );
if ( !structKeyExists( binding, "cfsqltype" ) ) {
binding.cfsqltype = inferSqlType( binding.value );
}
structAppend( binding, { list: false, null: false }, false );

if ( variables.autoAddScale && isFloatingPoint( binding ) ) {
param binding.scale = calculateNumberOfDecimalDigits( binding );
Expand Down

0 comments on commit 373ce21

Please sign in to comment.