MssqlSourceRef class

What a column belongs to, as an identity rather than as a piece of text.

Writing a fixed qualifier such as [dbo].[Orders].[CustomerId] into every column breaks once the query aliases the table or points the same generated code at another schema: the qualifier names the source it was generated from, not the one in the statement.

A column therefore carries which source it belongs to, and the alias it is written with is resolved during compilation from the scope that knows what that source is called in this statement.

Annotations
  • @immutable

Constructors

MssqlSourceRef({required String table, String? schema})
const
MssqlSourceRef.named(String table)
A source that is not a table: a subquery, a CTE, a derived table.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
parts List<String>
The parts to quote when the source appears unaliased.
no setter
qualifiedName String
dbo.Orders, for a message.
no setter
quoted String
[dbo].[Orders], for a query that gave the source no alias.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String?
final
table String
final

Methods

at({String? schema, String? table}) MssqlSourceRef
This source under another schema or name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override