Skip to content

postgrelize / CteDefinition

Type Alias: CteDefinition ​

CteDefinition = Readonly<{ cycle?: CteCycleOptions; materialized?: boolean; query: Subquery | WriteStatement; recursive?: Subquery; search?: CteSearchOptions; unionAll?: boolean; }>

Defined in: src/model/cte-builder.ts:18

Common table expression of the with option. PostgreSQL extension.

Example ​

ts
const cte: CteDefinition = {
  query: Task.subquery({ attributes: ['id'], where: { parentId: null } }),
  unionAll: true,
  materialized: false,
};

Released under the MIT License.