Table of Contents

Class CteDefinition

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

name string

The name the CTE is declared under and referenced by in from.

query QueryCommand

The 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

name string

The name the CTE is declared under and referenced by in from.

query QueryCommand

The query that defines the CTE.

recursive bool

Whether the CTE body may reference its own name.

maxRecursion int?

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

bool

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

string

Query

Query that defines the CTE, or the column shape of a data-modifying CTE.

public QueryCommand Query { get; }

Property Value

QueryCommand

Recursive

True when the CTE body may reference Name (a recursive CTE).

public bool Recursive { get; }

Property Value

bool