MssqlRepository<TRow, TKey>.withKeyValues constructor

MssqlRepository<TRow, TKey>.withKeyValues(
  1. MssqlSession session, {
  2. required MssqlTableBinding<TRow> binding,
  3. required Map<String, Object?> keyValues(
    1. TKey key
    ),
  4. String? schema,
  5. String? table,
  6. MssqlDialect? dialect,
  7. MssqlScopeSelection scope = const MssqlScopeSelection.empty(),
  8. MssqlClock clock = MssqlClock.serverUtc,
  9. MssqlChangeHub? changes,
  10. MssqlCapabilityCache? capabilities,
  11. MssqlQueryOptions options = MssqlQueryOptions.defaults,
})

A repository over a table with a composite key needs to know how to take that key apart, which only generated code can say.

Implementation

MssqlRepository.withKeyValues(
  this.session, {
  required MssqlTableBinding<TRow> binding,
  required Map<String, Object?> Function(TKey key) keyValues,
  String? schema,
  String? table,
  this.dialect,
  this.scope = const MssqlScopeSelection.empty(),
  this.clock = MssqlClock.serverUtc,
  this.changes,
  this.capabilities,
  this.options = MssqlQueryOptions.defaults,
}) : binding = binding.forTable(schema: schema, table: table),
     _keyValues = keyValues;