mirror of
https://github.com/harish2704/knex-json-query.git
synced 2026-09-10 04:41:07 +00:00
Fix for column names in raw
Use raw method to wrap column name with ticks
This commit is contained in:
@@ -36,3 +36,4 @@ jspm_packages
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
.vscode/*
|
||||
.idea
|
||||
|
||||
@@ -78,7 +78,7 @@ function addCondition (q, field, val) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var args = val[0].includes('RAW') ? [ '"'+val[1]+'" ' + val[2] ] : val.slice(1)
|
||||
var args = val[0].includes('RAW') ? [ q.client.raw('??', val[1]) + ' ' + val[2] ] : val.slice(1);
|
||||
return q[functionOperatorMap[val[0]]].apply(q, args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user