Class SqlTable
public class SqlTable : ISqlTableSource, ISqlExpression, IQueryElement, IEquatable<ISqlExpression>, ISqlExpressionWalkable
- Inheritance
-
SqlTable
- Implements
- Derived
- Extension Methods
Constructors
SqlTable(EntityDescriptor, string?)
public SqlTable(EntityDescriptor entityDescriptor, string? physicalName = null)
Parameters
entityDescriptor
EntityDescriptorphysicalName
string
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
SqlTablefields
IEnumerable<SqlField>tableArguments
ISqlExpression[]
SqlTable(Type, int?, SqlObjectName)
protected SqlTable(Type objectType, int? sourceId, SqlObjectName tableName)
Parameters
objectType
TypesourceId
int?tableName
SqlObjectName
Properties
Alias
public string? Alias { get; set; }
Property Value
All
public SqlField All { get; }
Property Value
CanBeNull
public bool CanBeNull { get; set; }
Property Value
ElementType
public virtual QueryElementType ElementType { get; }
Property Value
Expression
Custom SQL expression format string (used together with TableArguments) to transform SqlTable to custom table expression. Arguments:
- {0}: TableName
- {1}: Alias
- {2+}: arguments from TableArguments (with index adjusted by 2)
public string? Expression { get; set; }
Property Value
Fields
public IReadOnlyList<SqlField> Fields { get; }
Property Value
ID
public virtual string? ID { get; set; }
Property Value
IdentityFields
public IReadOnlyList<SqlField> IdentityFields { get; }
Property Value
ObjectType
public Type ObjectType { get; protected set; }
Property Value
SequenceAttributes
public SequenceNameAttribute[]? SequenceAttributes { get; protected set; }
Property Value
SourceID
public int SourceID { get; }
Property Value
SqlQueryExtensions
public List<SqlQueryExtension>? SqlQueryExtensions { get; set; }
Property Value
SqlTableType
public virtual SqlTableType SqlTableType { get; set; }
Property Value
TableArguments
public ISqlExpression[]? TableArguments { get; set; }
Property Value
TableName
public virtual SqlObjectName TableName { get; set; }
Property Value
TableOptions
public TableOptions TableOptions { get; set; }
Property Value
Methods
Add(SqlField)
public void Add(SqlField field)
Parameters
field
SqlField
AddRange(IEnumerable<SqlField>)
public void AddRange(IEnumerable<SqlField> collection)
Parameters
collection
IEnumerable<SqlField>
Equals(ISqlExpression, Func<ISqlExpression, ISqlExpression, bool>)
public bool Equals(ISqlExpression other, Func<ISqlExpression, ISqlExpression, bool> comparer)
Parameters
other
ISqlExpressioncomparer
Func<ISqlExpression, ISqlExpression, bool>
Returns
FindFieldByMemberName(string)
Search for table field by mapping class member name.
public SqlField? FindFieldByMemberName(string memberName)
Parameters
memberName
stringMapping class member name.
Returns
GetIdentityField()
public SqlField? GetIdentityField()
Returns
GetKeys(bool)
public IList<ISqlExpression> GetKeys(bool allIfEmpty)
Parameters
allIfEmpty
bool
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ToString(StringBuilder, Dictionary<IQueryElement, IQueryElement>)
public virtual StringBuilder ToString(StringBuilder sb, Dictionary<IQueryElement, IQueryElement> dic)
Parameters
Returns
Walk<TContext>(WalkOptions, TContext, Func<TContext, ISqlExpression, ISqlExpression>)
public virtual ISqlExpression Walk<TContext>(WalkOptions options, TContext context, Func<TContext, ISqlExpression, ISqlExpression> func)
Parameters
options
WalkOptionscontext
TContextfunc
Func<TContext, ISqlExpression, ISqlExpression>
Returns
Type Parameters
TContext