Table of Contents

Class SqlElement

Namespace
ItTiger.TigerQuery
Assembly
ItTiger.TigerQuery.dll
Represents one lexical element read from a SQL script.
public sealed class SqlElement
Inheritance
SqlElement
Inherited Members

Remarks

Line and column values are one-based source positions. Text retains delimiters and escapes exactly as read.

Constructors

SqlElement(SqlElementKind, string, int, int, SqlElementKind)

Initializes a lexical SQL element.
public SqlElement(SqlElementKind kind, string text, int line, int column, SqlElementKind endedBy = SqlElementKind.Unknown)

Parameters

kind SqlElementKind
The element's lexical kind.
text string
The raw source text, including delimiters.
line int
The one-based source line.
column int
The one-based source column.
endedBy SqlElementKind
The condition that terminated a text element.

Properties

Column

Gets or sets the one-based source column at which the element begins.
public int Column { get; set; }

Property Value

int

EndedBy

Gets or sets the condition that terminated a text element.
public SqlElementKind EndedBy { get; set; }

Property Value

SqlElementKind

InnerText

Gets the content without outer delimiters and with doubled closing delimiters unescaped for quoted strings and bracketed identifiers.
public string InnerText { get; }

Property Value

string
The unescaped inner content for delimited elements; otherwise Text.

Exceptions

TigerQueryException
The element is delimited but its Text has fewer than two characters.

Kind

Gets or sets the element's lexical kind.
public SqlElementKind Kind { get; set; }

Property Value

SqlElementKind

Line

Gets or sets the one-based source line at which the element begins.
public int Line { get; set; }

Property Value

int

Text

Gets or sets the raw source text, including any delimiters.
public string Text { get; set; }

Property Value

string