View Source FDB.Versionstamp (fdb v6.3.23-0)

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

Specs

t() :: %FDB.Versionstamp{raw: binary()}

Link to this section Functions

Link to this function

incomplete(user_version \\ 0)

View Source

Specs

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

Specs

incomplete?(t()) :: boolean()

Returns true if the transaction version is equal to placeholder value

Specs

new(binary()) :: t()
Link to this function

new(transaction_version, user_version)

View Source

Specs

new(binary(), integer()) :: t()
Link to this function

transaction_version(versionstamp)

View Source

Specs

transaction_version(t()) :: binary()

Returns the transaction version

Link to this function

user_version(versionstamp)

View Source

Specs

user_version(t()) :: integer()

Returns the user version

Specs

version(t()) :: binary()

Returns the full versionstamp as binary