Class CteBuilderExtensions
- Namespace
- LinqToDB
- Assembly
- linq2db.dll
Extension methods that expose CTE options on ICteBuilder.
public static class CteBuilderExtensions
- Inheritance
-
objectCteBuilderExtensions
Methods
IsMaterialized(ICteBuilder, bool)
Sets the MATERIALIZED / NOT MATERIALIZED CTE hint.
Recognized by PostgreSQL 12+, SQLite 3.35+, and ClickHouse 26.3+. Other providers silently drop the
hint without tracing — if you rely on the hint for performance, be aware it is a no-op on those providers.
public static ICteBuilder IsMaterialized(this ICteBuilder cteBuilder, bool materialized = true)
Parameters
cteBuilderICteBuilderBuilder provided by the
AsCtecallback.materializedbooltrue to emit
AS MATERIALIZED, false to emitAS NOT MATERIALIZED.
Returns
- ICteBuilder
The same builder for chaining.
Exceptions
- ArgumentNullException
cteBuilderis null.- NotSupportedException
cteBuilderdoes not implement IAnnotatableBuilderInternal. In-box builders always do; custom ICteBuilder implementations must opt in.