An extensible SQL generation library for JavaScript with a focus on introspectibility
{
type: 'union'
, all: true
, queries: [
{ type: 'select', table: 'users' }
, { type: 'select', table: 'other_users' }
]
};
var someGroup = {
expression: 'select * from users where user.id = 5'
};
var query = {
type: 'select'
, table: 'users'
, where: {
id: {
$nin: someGroup
}
}
};