hediet / ts-typed-sql

A fully typed sql builder. Not maintained anymore, use it for your inspiration.
https://hediet.github.io/ts-typed-sql/
54 stars 4 forks source link

Add more known function invocations #6

Closed phiresky closed 7 years ago

phiresky commented 7 years ago

e.g.

const distinct = (arg: s.Expression<any>) => new s.KnownFunctionInvocation("distinct", [arg], arg.type);
const min = (arg: s.Expression<any>) => new s.KnownFunctionInvocation("min", [arg], arg.type);
const max = (arg: s.Expression<any>) => new s.KnownFunctionInvocation("max", [arg], arg.type);
const nullif = (arg: s.Expression<any>, arg2: s.Expression<any>) => new s.KnownFunctionInvocation("nullif", [arg, arg2], arg.type);
phiresky commented 7 years ago

also abs

hediet commented 7 years ago

Done.