diff --git a/index.js b/index.js index 8f38ed9..029fc1d 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,9 @@ var functionOperatorMap = { AND_ISNULL: 'andWhereNull', AND_NOTNULL: 'andWhereNotNull', /* ---- */ - RAW: 'whereRaw' + RAW: 'whereRaw', + OR_RAW: 'orWhereRaw', + AND_RAW: 'whereRaw', }; var aliases = { @@ -64,7 +66,7 @@ function addCondition (q, field, val) { val = [ 'AND', field ].concat(val); } } - var args = val[0] === 'RAW' ? [ '"'+val[1]+'" ' + val[2] ] : val.slice(1) + var args = val[0].includes('RAW') ? [ '"'+val[1]+'" ' + val[2] ] : val.slice(1) return q[functionOperatorMap[val[0]]].apply(q, args); }