MssqlTableBinding<TRow> class

Everything generated code tells the runtime about one table.

The logic lives in MssqlRepository; a generated file writes one of these and nothing more. That is what makes a bug in paging a version bump rather than a regeneration against every consumer's live database.

Annotations
  • @immutable

Constructors

MssqlTableBinding({required String schema, required String table, required List<MssqlBoundColumn> columns, required TRow fromRow(MssqlRow row), required Map<String, Object?> toColumns(TRow row), required Object? readColumn(TRow row, String column), TRow applyIdentity(TRow row, Object? identity)?, TRow applyRelations(TRow row, Map<String, Object?> relations)?, bool isRelationLoaded(TRow row, String name)?, List<String> primaryKey = const <String>[], String? identityColumn, MssqlInsertStrategy insertStrategy = MssqlInsertStrategy.noKeyReadback, String schemaFingerprint = '', MssqlDecimalMode decimalMode = MssqlDecimalMode.exact, int apiVersion = MssqlApiVersion.current, MssqlSoftDelete? softDelete, MssqlTimestamps timestamps = const MssqlTimestamps(), List<MssqlScope> scopes = const <MssqlScope>[]})

Properties

apiVersion int
The ORM API contract the generated file was written against.
final
applyIdentity → TRow Function(TRow row, Object? identity)?
Puts a server-generated identity value back into a row.
final
applyRelations → TRow Function(TRow row, Map<String, Object?> relations)?
Puts loaded related rows into a row, and records which were loaded.
final
columns List<MssqlBoundColumn>
final
decimalMode → MssqlDecimalMode
Whether the generated row types assume DECIMAL arrives as double.
final
fromRow → TRow Function(MssqlRow row)
final
hashCode int
The hash code for this object.
no setterinherited
hasPrimaryKey bool
no setter
hasRelations bool
Whether this table has generated relations to attach.
no setter
identityColumn String?
final
insertStrategy MssqlInsertStrategy
final
isRelationLoaded bool Function(TRow row, String name)?
Whether row already carries name, for MssqlEntityQuery.loadMissing.
final
nameParts List<String>
The schema and table as separate parts.
no setter
primaryKey List<String>
final
qualifiedName String
no setter
quoted String
no setter
readColumn Object? Function(TRow row, String column)
One column of row, without building a map of every column.
final
rowVersionColumn MssqlBoundColumn?
The rowversion/timestamp column, if the table has one.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String
final
schemaFingerprint String
The schema this binding was generated from. Read by the drift check.
final
scopes List<MssqlScope>
Predicates applied to every read unless switched off by name.
final
softDelete MssqlSoftDelete?
Non-null when the table soft-deletes.
final
softDeletes bool
no setter
sourceRef MssqlSourceRef
This table's identity, for the columns that belong to it.
no setter
table String
final
timestamps MssqlTimestamps
The created/updated columns the runtime maintains, if any.
final
toColumns Map<String, Object?> Function(TRow row)
final
writableColumns List<MssqlBoundColumn>
The columns an INSERT or UPDATE may name.
no setter

Methods

column(String name) MssqlBoundColumn?
columnOf(Object? row, String column) Object?
readColumn without the type argument.
columnsNamed(TRow row, Iterable<String> names) Map<String, Object?>
The named columns of row, and nothing else.
columnsOf(Object? row) Map<String, Object?>
toColumns without the type argument.
erase() MssqlTableBinding<Object?>
Erases TRow so through and morph maps can hold mixed tables.
forTable({String? schema, String? table}) MssqlTableBinding<TRow>
This binding pointed at a different table.
namedColumnsOf(Object? row, Iterable<String> names) Map<String, Object?>
columnsNamed without the type argument.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rowFrom(MssqlRow row) Object?
fromRow without the type argument, for the same reason.
toString() String
A string representation of this object.
override
withRelations(Object? row, Map<String, Object?> relations) Object?
applyRelations without the type argument, for the same reason as columnsOf.

Operators

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