Table of Contents

Class SqlTable

Namespace
LinqToDB.Internal.SqlQuery
Assembly
linq2db.dll
public class SqlTable : SqlExpressionBase, ISqlTableSource, ISqlExpression, IQueryElement, IEquatable<ISqlExpression>
Inheritance
SqlTable
Implements
Derived
Inherited Members
Extension Methods

Constructors

SqlTable(SqlTable)

public SqlTable(SqlTable table)

Parameters

table SqlTable

SqlTable(SqlTable, IEnumerable<SqlField>, ISqlExpression[])

public SqlTable(SqlTable table, IEnumerable<SqlField> fields, ISqlExpression[] tableArguments)

Parameters

table SqlTable
fields IEnumerable<SqlField>
tableArguments ISqlExpression[]

SqlTable(EntityDescriptor, string?)

public SqlTable(EntityDescriptor entityDescriptor, string? physicalName = null)

Parameters

entityDescriptor EntityDescriptor
physicalName string

SqlTable(Type, int?, SqlObjectName)

protected SqlTable(Type objectType, int? sourceId, SqlObjectName tableName)

Parameters

objectType Type
sourceId int?
tableName SqlObjectName

Properties

Alias

public string? Alias { get; set; }

Property Value

string

All

public SqlField All { get; }

Property Value

SqlField

CanBeNull

public bool CanBeNull { get; set; }

Property Value

bool

ElementType

AST node type.

public override QueryElementType ElementType { get; }

Property Value

QueryElementType

Expression

Custom SQL expression format string (used together with TableArguments) to transform SqlTable to custom table expression. Arguments:

public string? Expression { get; set; }

Property Value

string

Fields

public List<SqlField> Fields { get; }

Property Value

List<SqlField>

ID

public virtual string? ID { get; set; }

Property Value

string

IdentityFields

public IReadOnlyList<SqlField> IdentityFields { get; }

Property Value

IReadOnlyList<SqlField>

ObjectType

public Type ObjectType { get; protected set; }

Property Value

Type

Precedence

public override int Precedence { get; }

Property Value

int

SequenceAttributes

public SequenceNameAttribute[]? SequenceAttributes { get; protected set; }

Property Value

SequenceNameAttribute[]

SourceID

public int SourceID { get; }

Property Value

int

SqlQueryExtensions

public List<SqlQueryExtension>? SqlQueryExtensions { get; set; }

Property Value

List<SqlQueryExtension>

SqlTableType

public virtual SqlTableType SqlTableType { get; set; }

Property Value

SqlTableType

SystemType

public override Type SystemType { get; }

Property Value

Type

TableArguments

public ISqlExpression[]? TableArguments { get; set; }

Property Value

ISqlExpression[]

TableName

public virtual SqlObjectName TableName { get; set; }

Property Value

SqlObjectName

TableOptions

public TableOptions TableOptions { get; set; }

Property Value

TableOptions

Methods

Add(SqlField)

public void Add(SqlField field)

Parameters

field SqlField

AddRange(IEnumerable<SqlField>)

public void AddRange(IEnumerable<SqlField> collection)

Parameters

collection IEnumerable<SqlField>

CanBeNullable(NullabilityContext)

public override bool CanBeNullable(NullabilityContext nullability)

Parameters

nullability NullabilityContext

Returns

bool

Create<T>(IDataContext)

public static SqlTable Create<T>(IDataContext dataContext)

Parameters

dataContext IDataContext

Returns

SqlTable

Type Parameters

T

Equals(ISqlExpression?, Func<ISqlExpression, ISqlExpression, bool>)

public override bool Equals(ISqlExpression? other, Func<ISqlExpression, ISqlExpression, bool> comparer)

Parameters

other ISqlExpression
comparer Func<ISqlExpression, ISqlExpression, bool>

Returns

bool

FindFieldByMemberName(string)

Search for table field by mapping class member name.

public SqlField? FindFieldByMemberName(string memberName)

Parameters

memberName string

Mapping class member name.

Returns

SqlField

GetElementHashCode()

public override int GetElementHashCode()

Returns

int

GetIdentityField()

public SqlField? GetIdentityField()

Returns

SqlField

GetKeys(bool)

public virtual IList<ISqlExpression>? GetKeys(bool allIfEmpty)

Parameters

allIfEmpty bool

Returns

IList<ISqlExpression>

ResetKeys()

public void ResetKeys()

ToString(QueryElementTextWriter)

Generates debug text representation of AST node.

public override QueryElementTextWriter ToString(QueryElementTextWriter writer)

Parameters

writer QueryElementTextWriter

Returns

QueryElementTextWriter