Skip to content

postgrelize / QueryOptionsWithType

Type Alias: QueryOptionsWithType<T> ​

QueryOptionsWithType<T> = QueryOptions & Readonly<{ type: T; }>

Defined in: src/query/query-result-shaper.ts:150

QueryOptions with a required query type (Sequelize v6 QueryOptionsWithType).

Type Parameters ​

T ​

T extends QueryType

The query type, e.g. QueryTypes.SELECT.

Example ​

ts
const options: QueryOptionsWithType<QueryTypes.SELECT> = { type: QueryTypes.SELECT };
const rows = await sequelize.query('SELECT 1 AS one', options);

Released under the MIT License.