toRecord method

Map<String, Object?> toRecord({
  1. ValueCodecRegistry? registry,
})
inherited

Serializes the model into a column map via its codec/definition.

Implementation

Map<String, Object?> toRecord({ValueCodecRegistry? registry}) {
  final def = expectDefinition();
  final codecs =
      registry ??
      connectionResolver?.codecRegistry ??
      ValueCodecRegistry.instance;
  return def.toMap(_self(), registry: codecs);
}