Table of Contents

Class SqlStatementPart

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

Represents a typed part of a SQL statement built from a parsed segment.

public abstract class SqlStatementPart
Inheritance
SqlStatementPart
Derived
Inherited Members
Extension Methods

Constructors

SqlStatementPart(string, SqlSegment)

Initializes a new instance of the SqlStatementPart class.

protected SqlStatementPart(string name, SqlSegment segment)

Parameters

name string

Name of the part for identification.

segment SqlSegment

The underlying segment represented by the part.

Exceptions

ArgumentNullException

Thrown when name or segment is null.

Properties

Name

Gets the display name of the part.

public string Name { get; }

Property Value

string

Segment

Gets the SqlSegment that stores the parsed tokens.

public SqlSegment Segment { get; }

Property Value

SqlSegment

Methods

ToSql()

Builds the SQL text represented by the part.

public string ToSql()

Returns

string

The SQL string rendered from the underlying segment.