Class SqlObjectNameExpression
A database object name (table / sequence / trigger / field) that renders with a specific
ConvertType. Lets a SqlFragment — and thus a SqlRawStatement —
carry a correctly-quoted derived name (e.g. an identity sequence SIDENTITY_<table>) whose quoting
is only available in the SQL builder.
public sealed class SqlObjectNameExpression : SqlExpressionBase, ISqlExpression, IQueryElement, IEquatable<ISqlExpression>
- Inheritance
-
objectSqlObjectNameExpression
- Implements
- Inherited Members
- Extension Methods
Remarks
Produced server-side during scenario render (never present in a client-serialized statement), so it is
intentionally not handled by LinqServiceSerializer — remote serialization of it would throw.
Constructors
SqlObjectNameExpression(SqlObjectName, ConvertType, TableOptions, bool)
Creates an object-name expression for name rendered with convertType.
public SqlObjectNameExpression(SqlObjectName name, ConvertType convertType, TableOptions tableOptions = TableOptions.NotSet, bool insideStringLiteral = false)
Parameters
nameSqlObjectNameconvertTypeConvertTypetableOptionsTableOptionsinsideStringLiteralbool
Properties
ConvertType
How the builder should quote/convert Name (table, sequence, trigger, …).
public ConvertType ConvertType { get; }
Property Value
ElementType
AST node type.
public override QueryElementType ElementType { get; }
Property Value
InsideStringLiteral
Whether the fragment holding this placeholder puts it inside a SQL string literal, as Oracle's
EXECUTE IMMEDIATE '…' blocks do. Identifier quoting alone does not survive that position: an
apostrophe in the name would close the enclosing literal and the rest would be parsed as code, so the
builder additionally escapes the rendered name for literal-body position. The literal's own delimiters
stay in the fragment's format string - only the body is escaped.
public bool InsideStringLiteral { get; }
Property Value
Name
The database object name to render.
public SqlObjectName Name { get; }
Property Value
Precedence
public override int Precedence { get; }
Property Value
SystemType
public override Type? SystemType { get; }
Property Value
TableOptions
Table options influencing the rendered name (e.g. temporary-table qualification).
public TableOptions TableOptions { get; }
Property Value
Methods
Accept(QueryElementVisitor)
Visitor support.
public override IQueryElement Accept(QueryElementVisitor visitor)
Parameters
visitorQueryElementVisitor
Returns
CanBeNullable(NullabilityContext)
public override bool CanBeNullable(NullabilityContext nullability)
Parameters
nullabilityNullabilityContext
Returns
Equals(ISqlExpression, Func<ISqlExpression, ISqlExpression, bool>)
public override bool Equals(ISqlExpression other, Func<ISqlExpression, ISqlExpression, bool> comparer)
Parameters
otherISqlExpressioncomparerFunc<ISqlExpression, ISqlExpression, bool>
Returns
GetElementHashCode()
public override int GetElementHashCode()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ToString(QueryElementTextWriter)
Generates debug text representation of AST node.
public override QueryElementTextWriter ToString(QueryElementTextWriter writer)
Parameters
writerQueryElementTextWriter