# Interface: CTEOptions
Defined in: packages/core/src/models/SelectQuery.ts:23
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?
optionalmaterialized:null|boolean
Defined in: packages/core/src/models/SelectQuery.ts:24