|
|
@ -57,9 +57,9 @@ const pg = { |
|
|
|
DATEADD: async ({ fn, knex, pt, colAlias }: MapFnArgs) => { |
|
|
|
DATEADD: async ({ fn, knex, pt, colAlias }: MapFnArgs) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
builder: knex.raw( |
|
|
|
builder: knex.raw( |
|
|
|
`(${(await fn(pt.arguments[0])).builder})::DATE + (${ |
|
|
|
`(${(await fn(pt.arguments[0])).builder})${ |
|
|
|
(await fn(pt.arguments[1])).builder |
|
|
|
pt.arguments[0].type !== 'DATE' ? '::DATE' : '' |
|
|
|
} ||
|
|
|
|
} + (${(await fn(pt.arguments[1])).builder} ||
|
|
|
|
'${String((await fn(pt.arguments[2])).builder).replace( |
|
|
|
'${String((await fn(pt.arguments[2])).builder).replace( |
|
|
|
/["']/g, |
|
|
|
/["']/g, |
|
|
|
'', |
|
|
|
'', |
|
|
|