fdb v5.1.7-7 FDB.Versionstamp View Source

A versionstamp is a 12 byte, unique, monotonically (but not sequentially) increasing value for each committed transaction.

{8 byte} {2 byte} {2 byte}

  1. The first 8 bytes are the committed version of the database.
  2. The next 2 bytes are monotonic in the serialization order for transactions.
  3. The last 2 bytes are user supplied version in big-endian format

Link to this section Summary

Functions

Creates an incomplete versionstamp

Returns true if the transaction version is equal to placeholder value

Returns the transaction version

Returns the user version

Returns the full versionstamp as binary

Link to this section Types

Link to this type t() View Source
t() :: %FDB.Versionstamp{raw: binary()}

Link to this section Functions

Link to this function incomplete(user_version \\ 0) View Source
incomplete(integer()) :: t()

Creates an incomplete versionstamp.

A placeholder value is used instead of the transaction version. When a key created with an incompleted version is passed to FDB.Transaction.set_versionstamped_key/4, the placeholder value will get replaced by transaction version on commit.

Link to this function incomplete?(versionstamp) View Source
incomplete?(t()) :: boolean()

Returns true if the transaction version is equal to placeholder value

Link to this function new(transaction_version, user_version) View Source
new(binary(), integer()) :: t()
Link to this function transaction_version(versionstamp) View Source
transaction_version(t()) :: binary()

Returns the transaction version

Link to this function user_version(versionstamp) View Source
user_version(t()) :: integer()

Returns the user version

Link to this function version(versionstamp) View Source
version(t()) :: binary()

Returns the full versionstamp as binary