postgrelize / fn
Function: fn() ​
fn(
name, ...args):Fn
Defined in: src/expressions/methods.ts:61
Creates an SQL function call. String arguments are written into the SQL as escaped literals, like v6 (COUNT('*'), concat_ws(' ', ...)); other values are bound as parameters; expressions are rendered as is.
Parameters ​
name ​
string
Function name, e.g. 'lower'.
args ​
...readonly unknown[]
Function arguments.
Returns ​
Function call expression.
Example ​
ts
await User.findAll({ where: where(fn('lower', col('email')), 'a@b.c') });