ExESDB.StreamsHelper (ex_esdb v0.0.20)

Provides helper functions for working with event store streams.

Summary

Functions

calculate_versions(start_version, count, direction)

get_version!(store, stream_id)

@spec get_version!(
  store :: atom(),
  stream_id :: String.t()
) :: integer()

Returns the version of the stream. ## Parameters

  • store is the name of the store.
  • stream_id is the name of the stream.

## Returns

  • version or 0 if the stream does not exist.

pad_version(version, length)

stream_exists?(store, stream_id)

to_event_record(new_event, stream_id, version, created, created_epoch)

version_to_integer(padded_version)