Skip to content

Commit

Permalink
fix(QueryBuilder): Use named parameters when passing to BaseGrammar
Browse files Browse the repository at this point in the history
This avoids problems where custom Grammars have extra arguments and
we add arguments to the official grammar
  • Loading branch information
elpete committed Jun 6, 2023
1 parent 248eac2 commit 488743b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions models/Query/QueryBuilder.cfc
Expand Up @@ -3543,18 +3543,18 @@ component displayname="QueryBuilder" accessors="true" {
private any function runQuery( required string sql, struct options = {}, string returnObject = "query" ) {
structAppend( arguments.options, getDefaultOptions(), false );
var result = grammar.runQuery(
variables.sqlCommenter.appendSqlComments(
sql = variables.sqlCommenter.appendSqlComments(
sql,
arguments.options.keyExists( "datasource" ) && !isNull( arguments.options.datasource ) ? arguments.options.datasource : javacast(
"null",
""
)
),
getBindings( except = getAggregate().isEmpty() ? [] : [ "select" ] ),
arguments.options,
returnObject,
variables.pretending,
function( data ) {
bindings = getBindings( except = getAggregate().isEmpty() ? [] : [ "select" ] ),
options = arguments.options,
returnObject = returnObject,
pretend = variables.pretending,
postProcessHook = function( data ) {
variables.queryLog.append( duplicate( data ) );
}
);
Expand Down

0 comments on commit 488743b

Please sign in to comment.