Currently, keys are extracted from the where statement which intrinsically creates an AND statement. To prevent breaking changes, the current behaviour will stay the same, but we can consider to have **custom operators** to extend the where functionally. ## Introducing $ operators. Theses operators can extend the functionally within `where` clause. Example: ```javascript qb.query({ columns: 'id, name, status', where: { status: { equals: 'finished' }, $or: [ { name: { equals: 'Alice' } }, { city: { equals: 'New York' } } ] } }) ``` This will be parsed to become: > [!NOTE] > Between `status` and `$or`, the operation `AND` stays applicable. > Example below: ```sql select id,name,status from users where status AND ( name = "alice" OR city = "New York" ) ``` This can resolve #43 This can open opportunity to `$and`
Currently, keys are extracted from the where statement which intrinsically creates an AND statement.
To prevent breaking changes, the current behaviour will stay the same, but we can consider to have custom operators to extend the where functionally.
Introducing $ operators.
Theses operators can extend the functionally within
whereclause.Example:
This will be parsed to become:
Note
Between
statusand$or, the operationANDstays applicable.Example below:
This can resolve #43
This can open opportunity to
$and