export function addToQuery ( query , type = 'AND' , additional , ... args ) { if ( ! query ) { return [ additional , ... args ] ; } else { const [ arg0 , ... rest ] = query ; return [ `${ arg0 } ${ type } ${ additional }` , ... rest , ... args ] as any ; } } export function and ( query , additional , ... args ) { return addToQuery ( query , 'AND' , additional , ... args ) ; } export function isNull ( field ) { return `${ field } IS NULL` ; } export function isIn ( field ) { return `${ field } IS NULL` ; }