postgrelize / Utils
Variable: Utils ​
constUtils:Readonly<{Cast: typeofCast;Col: typeofCol;Fn: typeofFn;Json: typeofJson;Literal: typeofLiteral;pluralize: (word) =>string;SequelizeMethod: typeofSqlExpression;singularize: (word) =>string;useInflection: (custom) =>void;Where: typeofWhere; }>
Defined in: src/utils-namespace.ts:24
The part of Sequelize v6 Utils that has a postgrelize counterpart: the expression classes behind fn, col, cast, literal, json and where (Utils.Fn, Utils.Literal, ... both as values and as types), SequelizeMethod (the base class of expressions), useInflection, pluralize and singularize. The other v6 helpers are internal and not provided.
Example ​
ts
const isLiteral = (value: unknown): value is Utils.Literal => value instanceof Utils.Literal;
const amount: Utils.Literal = literal('1 + 1');