Class CteDefinition
Represents a CTE definition inside a WITH clause.
public sealed class CteDefinition
- Inheritance
-
CteDefinition
- Inherited Members
- Extension Methods
Constructors
CteDefinition(string, IReadOnlyList<string>?, SqlStatement)
Initializes a new instance of the CteDefinition class.
public CteDefinition(string name, IReadOnlyList<string>? columns, SqlStatement statement)
Parameters
namestringName of the CTE.
columnsIReadOnlyList<string>Optional list of column names.
statementSqlStatementThe statement defining the CTE.
Properties
Columns
Gets the optional list of column names.
public IReadOnlyList<string>? Columns { get; }
Property Value
Name
Gets the name of the CTE.
public string Name { get; }
Property Value
Statement
Gets the statement associated with the CTE.
public SqlStatement Statement { get; }
Property Value
Methods
ToSql()
Builds the SQL text representing the CTE definition.
public string ToSql()
Returns
- string
The SQL string for the CTE.