View Source EventStore.Serializer behaviour (EventStore v1.4.7)

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

Summary

Callbacks

Deserialize the given data to the corresponding term.

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

Functions

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

Types

config()

@type config() :: Keyword.t()

t()

@type t() :: module()

Callbacks

deserialize(arg1, config)

@callback deserialize(binary() | map(), config()) :: any()

Deserialize the given data to the corresponding term.

serialize(any)

@callback serialize(any()) :: binary() | map()

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

Functions

serializer(event_store, config)

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