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
kindSqlElementKind- The element's lexical kind.
textstring- The raw source text, including delimiters.
lineint- The one-based source line.
columnint- The one-based source column.
endedBySqlElementKind- 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
EndedBy
Gets or sets the condition that terminated a text element.
public SqlElementKind EndedBy { get; set; }
Property Value
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
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
Line
Gets or sets the one-based source line at which the element begins.
public int Line { get; set; }
Property Value
Text
Gets or sets the raw source text, including any delimiters.
public string Text { get; set; }