IdbExportNativeValueEncoder typedef

IdbExportNativeValueEncoder = FutureOr<Object?> Function(IdbExportNativeValueContext context)

Converts a native value met by an export, a native value cannot be exported as is.

It returns the value to export in its place (any value the export supports, null included), IdbExportNativeValue.drop or IdbExportNativeValue.dropRecord. When the native value is the record value, null drops the record (a record value cannot be null). An error thrown stops the export.

Called once the records are read, it can be asynchronous (e.g. to read the bytes of a JS Blob).

Implementation

typedef IdbExportNativeValueEncoder =
    FutureOr<Object?> Function(IdbExportNativeValueContext context);