Class CteDefinition
A single common table expression: the name it is declared under, the query that produces it and whether it is recursive (a recursive CTE body may reference its own name).
public sealed class CteDefinition
- Inheritance
-
CteDefinition
- Inherited Members
- Extension Methods
Constructors
CteDefinition(string, QueryCommand)
Creates a non-recursive CTE definition.
public CteDefinition(string name, QueryCommand query)
Parameters
namestringThe name the CTE is declared under and referenced by in
from.queryQueryCommandThe query that defines the CTE.
CteDefinition(string, QueryCommand, bool, int?)
Creates a CTE definition, optionally recursive and with a recursion-depth limit.
public CteDefinition(string name, QueryCommand query, bool recursive, int? maxRecursion = null)
Parameters
namestringThe name the CTE is declared under and referenced by in
from.queryQueryCommandThe query that defines the CTE.
recursiveboolWhether the CTE body may reference its own name.
maxRecursionint?Optional recursion-depth limit; see MaxRecursion.
Properties
IsDataModifying
True when the CTE body is a data-modifying statement rather than a SELECT.
public bool IsDataModifying { get; }
Property Value
MaxRecursion
Optional recursion depth limit. Rendered as option (maxrecursion n) by dialects that
need one (SQL Server); ignored by dialects that rely on their own default.
public int? MaxRecursion { get; }
Property Value
- int?
Name
Name the CTE is declared under and referenced by in from.
public string Name { get; }
Property Value
Query
Query that defines the CTE, or the column shape of a data-modifying CTE.
public QueryCommand Query { get; }
Property Value
Recursive
True when the CTE body may reference Name (a recursive CTE).
public bool Recursive { get; }