-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
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:
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:
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels