Skip to content
# Interface: CTEOptions

Defined in: packages/core/src/models/SelectQuery.ts:20

Options that control how a Common Table Expression is materialized when the query is executed.

Example

typescript
const mainQuery = SelectQueryParser.parse('SELECT * FROM users').toSimpleQuery();
const cte = SelectQueryParser.parse('SELECT id FROM accounts WHERE active = true');

mainQuery.addCTE('active_accounts', cte, { materialized: true });

Related tests: packages/core/tests/models/SelectQuery.cte-management.test.ts

Properties

materialized?

optional materialized: null | boolean

Defined in: packages/core/src/models/SelectQuery.ts:21

Released under the MIT License.