ExMessageDB v0.1.0 ExMessageDB.Message View Source

An Ecto type for Message data type.

Link to this section Summary

Types

t()

A representation of Message data type.

Functions

Casts to Message.

Converts a Message into a Tuple.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Converts a Tuple into a Message.

Returns the underlying schema type.

Link to this section Types

Specs

t() :: %ExMessageDB.Message{
  data: Ecto.Schema.embedded_schema(),
  global_position: non_neg_integer(),
  id: String.t(),
  metadata: map() | nil,
  position: non_neg_integer(),
  stream_name: String.t(),
  time: DateTime.t(),
  type: module()
}

A representation of Message data type.

Link to this section Functions

Specs

cast(data :: map() | list()) :: {:ok, t()} | :error

Casts to Message.

Specs

dump(data :: t()) :: {:ok, tuple()} | :error

Converts a Message into a Tuple.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Specs

load(data :: tuple()) :: {:ok, t()} | :error

Converts a Tuple into a Message.

Returns the underlying schema type.