Rill.MessageStore.Ecto.Postgres v0.1.2 Rill.MessageStore.Ecto.Postgres.Database View Source

Link to this section Summary

Link to this section Types

Link to this type

row_map() View Source
row_map() :: %{
  id: String.t(),
  stream_name: Rill.MessageStore.StreamName.t(),
  type: String.t(),
  position: non_neg_integer(),
  global_position: pos_integer(),
  data: map(),
  metadata: map(),
  time: String.t()
}

Link to this section Functions

Link to this function

constrain_condition(condition) View Source
constrain_condition(condition :: String.t() | nil) :: String.t() | nil

Link to this function

convert(rows) View Source
convert(rows :: [row()]) :: [row_map()]

Link to this function

convert_position(arg1) View Source
convert_position(rows :: nil | [] | [[non_neg_integer()]]) :: non_neg_integer()

Link to this function

convert_row(row) View Source
convert_row(row :: nil | row()) :: row_map()

Link to this function

execute(repo, sql, params) View Source
execute(repo :: atom(), sql :: String.t(), params :: list()) ::
  non_neg_integer()

Link to this function

raise_known_error(error) View Source
raise_known_error(
  error :: %Postgrex.Error{
    __exception__: term(),
    connection_id: term(),
    message: term(),
    postgres: term(),
    query: term()
  }
) :: no_return()

Link to this function

sql_get(stream_name) View Source
sql_get(stream_name :: Rill.MessageStore.StreamName.t()) :: String.t()

Link to this function

sql_get_last(stream_name) View Source
sql_get_last(stream_name :: Rill.MessageStore.StreamName.t()) :: String.t()