-
Notifications
You must be signed in to change notification settings - Fork 562
Description
First off, excellent work on the query builder. I've just recently discovered it and it's very nice indeed.
However, I have discovered a problem with getRulesFromSQL
when passing in a string.
I am passing in the following string:
"BookingsCount" = 200 (The quotation marks are there due to my using PostgreSQL; I set the field names on the quotation marks)
The error message I get is as follows:
data.left.values is undefined (line 4791)
I can see in your code (query-builder.standalone.js) that you do the following if a string is passed in:
if (typeof data == 'string') {
data = { sql: data };
}
So you turn it into an object, but only give it the "sql" property and then you go on to use other properties below in the code, like data.operation
, data.left
and data.right
when they don't exist.
Can this be easily fixed?