|
|
|
@ -24,5 +24,11 @@ export default {
|
|
|
|
|
return args.knex.raw(`CASE ${query}\n END${args.colAlias}`) |
|
|
|
|
}, |
|
|
|
|
TRUE: (_args) => 1, |
|
|
|
|
FALSE:(_args) => 0 |
|
|
|
|
FALSE: (_args) => 0, |
|
|
|
|
AND: (args: MapFnArgs) => { |
|
|
|
|
return args.knex.raw(`${args.knex.raw(`${args.pt.arguments.map(ar => args.fn(ar).toQuery()).join(' AND ')}`).wrap('(', ')').toQuery()}${args.colAlias}`) |
|
|
|
|
}, |
|
|
|
|
OR: (args: MapFnArgs) => { |
|
|
|
|
return args.knex.raw(`${args.knex.raw(`${args.pt.arguments.map(ar => args.fn(ar).toQuery()).join(' OR ')}`).wrap('(', ')').toQuery()}${args.colAlias}`) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|