EventStore v1.0.3 EventStore.Serializer behaviour View Source

Specification of a serializer to convert between an Elixir term and its representation in the database.

Link to this section Summary

Functions

Get the serializer module from the given config for the event store.

Callbacks

Deserialize the given data to the corresponding term.

Serialize the given term to a representation that can be stored by the database.

Link to this section Types

Link to this section Functions

Link to this function

serializer(event_store, config)

View Source

Get the serializer module from the given config for the event store.

Link to this section Callbacks

Link to this callback

deserialize(arg1, config)

View Source
deserialize(binary() | map(), config()) :: any()

Deserialize the given data to the corresponding term.

Link to this callback

serialize(any)

View Source
serialize(any()) :: binary() | map()

Serialize the given term to a representation that can be stored by the database.