relationKeyOf<T> function

MssqlRelationKey relationKeyOf<T>(
  1. MssqlTableBinding<T> binding,
  2. List<String> columns,
  3. Map<String, Object?> values
)

Groups rows by columns using each column's codec key, not Dart ==.

A uniqueidentifier or a collated string compared as Dart values can split one SQL key into two map keys; the codec is the same object the predicate binds with.

Implementation

MssqlRelationKey relationKeyOf<T>(
  MssqlTableBinding<T> binding,
  List<String> columns,
  Map<String, Object?> values,
) {
  return MssqlRelationKey(<Object?>[
    for (final name in columns) _codecKey(binding, name, values[name]),
  ]);
}