Skip to content

Commit 9f2c633

Browse files
committedJul 13, 2021
Fix for column names in raw
Use raw method to wrap column name with ticks
1 parent 205e8d1 commit 9f2c633

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ jspm_packages
3636
# Optional REPL history
3737
.node_repl_history
3838
.vscode/*
39+
.idea

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function addCondition (q, field, val) {
5757
return val.forEach(addCondition.bind(null, this, field));
5858
});
5959
}
60-
60+
6161
if (!Array.isArray(val)) {
6262
// Simple string or number value
6363
val = ['AND', field, val ];
@@ -78,7 +78,7 @@ function addCondition (q, field, val) {
7878
}
7979
}
8080
}
81-
var args = val[0].includes('RAW') ? [ '"'+val[1]+'" ' + val[2] ] : val.slice(1)
81+
var args = val[0].includes('RAW') ? [ q.client.raw('??', val[1]) + ' ' + val[2] ] : val.slice(1);
8282
return q[functionOperatorMap[val[0]]].apply(q, args);
8383
}
8484

0 commit comments

Comments
 (0)