Table of Contents

Class CteDefinition

Namespace
Utils.Data.Sql
Assembly
Utils.Data.dll

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

name string

Name of the CTE.

columns IReadOnlyList<string>

Optional list of column names.

statement SqlStatement

The statement defining the CTE.

Properties

Columns

Gets the optional list of column names.

public IReadOnlyList<string>? Columns { get; }

Property Value

IReadOnlyList<string>

Name

Gets the name of the CTE.

public string Name { get; }

Property Value

string

Statement

Gets the statement associated with the CTE.

public SqlStatement Statement { get; }

Property Value

SqlStatement

Methods

ToSql()

Builds the SQL text representing the CTE definition.

public string ToSql()

Returns

string

The SQL string for the CTE.