Spacetimedbex.ClientCache.RowDecoder (spacetimedbex v0.1.2)

Copy Markdown View Source

Decodes BSATN row data into Elixir maps using table schema.

Takes a BsatnRowList (as returned in SubscribeApplied / TransactionUpdate) and a list of column definitions, and produces a list of row maps.

Summary

Functions

Decode a single BSATN row binary into a map using column definitions.

Decode a BsatnRowList into a list of row maps.

Decode a BSATN value of the given algebraic type.

Functions

decode_row(data, columns)

Decode a single BSATN row binary into a map using column definitions.

decode_row_list(arg1, columns)

Decode a BsatnRowList into a list of row maps.

Parameters

  • row_list - Map with :size_hint and :rows_data (from ServerMessage decoding)
  • columns - List of %{name: String.t(), type: algebraic_type()} from Schema

decode_value(data, arg2)

Decode a BSATN value of the given algebraic type.