TransactionDB

zio.rocksdb.TransactionDB
See theTransactionDB companion object
trait TransactionDB extends RocksDB

Attributes

Companion
object
Graph
Supertypes
trait RocksDB
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def atomically[R, E >: Throwable, A](writeOptions: WriteOptions)(zio: ZIO[Transaction & R, E, A])(implicit A: TransactionWithSomething): ZIO[R, E, A]

Executes the provided zio program in a single transaction.

Executes the provided zio program in a single transaction.

Attributes

def atomically[E >: Throwable, A](writeOptions: WriteOptions)(zio: ZIO[Transaction, E, A])(implicit A: TransactionOnly): ZIO[Any, E, A]

Executes the provided zio program in a single transaction.

Executes the provided zio program in a single transaction.

Attributes

def beginTransaction(writeOptions: WriteOptions): ZIO[Scope, Throwable, Transaction]

Creates a managed instance of service.Transaction using the provided WriteOptions.

Creates a managed instance of service.Transaction using the provided WriteOptions.

Attributes

Concrete methods

def atomically[R, E >: Throwable, A](zio: ZIO[Transaction & R, E, A])(implicit A: TransactionWithSomething): ZIO[R, E, A]

Executes the provided zio program in a single transaction.

Executes the provided zio program in a single transaction.

Attributes

def atomically[E >: Throwable, A](zio: ZIO[Transaction, E, A])(implicit A: TransactionOnly): ZIO[Any, E, A]

Executes the provided zio program in a single transaction.

Executes the provided zio program in a single transaction.

Attributes

def beginTransaction: ZIO[Scope, Throwable, Transaction]

Creates a managed instance of service.Transaction.

Creates a managed instance of service.Transaction.

Attributes

Inherited methods

def createColumnFamilies(columnFamilyOptions: ColumnFamilyOptions, columnFamilyNames: List[Array[Byte]]): Task[List[ColumnFamilyHandle]]

Creates ColumnFamilies from a list of ColumnFamilyNames and ColumnFamilyOptions

Creates ColumnFamilies from a list of ColumnFamilyNames and ColumnFamilyOptions

Attributes

Inherited from:
RocksDB
def createColumnFamilies(columnFamilyDescriptors: List[ColumnFamilyDescriptor]): Task[List[ColumnFamilyHandle]]

Creates ColumnFamilies from a list of ColumnFamilyDescriptors

Creates ColumnFamilies from a list of ColumnFamilyDescriptors

Attributes

Inherited from:
RocksDB
def createColumnFamily(columnFamilyDescriptor: ColumnFamilyDescriptor): Task[ColumnFamilyHandle]

Creates a new ColumnFamily from ColumnFamilyDescriptor

Creates a new ColumnFamily from ColumnFamilyDescriptor

Attributes

Inherited from:
RocksDB
def delete(cfHandle: ColumnFamilyHandle, key: Array[Byte]): Task[Unit]

Delete a key from a specific ColumnFamily in the database.

Delete a key from a specific ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def delete(key: Array[Byte]): Task[Unit]

Delete a key from the default ColumnFamily in the database.

Delete a key from the default ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def dropColumnFamilies(columnFamilyHandles: List[ColumnFamilyHandle]): Task[Unit]

Deletes ColumnFamilies given a list of ColumnFamilyHandles

Deletes ColumnFamilies given a list of ColumnFamilyHandles

Attributes

Inherited from:
RocksDB
def dropColumnFamily(columnFamilyHandle: ColumnFamilyHandle): Task[Unit]

Deletes a ColumnFamily

Deletes a ColumnFamily

Attributes

Inherited from:
RocksDB
def flush(flushOptions: FlushOptions, columnFamilyHandles: List[ColumnFamilyHandle]): Task[Unit]

Flush multiple column families.

Flush multiple column families.

Attributes

Inherited from:
RocksDB
def flush(flushOptions: FlushOptions, columnFamilyHandle: ColumnFamilyHandle): Task[Unit]

Flush all memory table data.

Flush all memory table data.

Attributes

Inherited from:
RocksDB
def flush(flushOptions: FlushOptions): Task[Unit]

Flush all memory table data

Flush all memory table data

Attributes

Inherited from:
RocksDB
def flushWal(sync: Boolean): Task[Unit]

Flush the WAL memory buffer to the file

Flush the WAL memory buffer to the file

Attributes

Inherited from:
RocksDB
def get(cfHandle: ColumnFamilyHandle, key: Array[Byte]): Task[Option[Array[Byte]]]

Retrieve a key from a specific ColumnFamily in the database.

Retrieve a key from a specific ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def get(key: Array[Byte]): Task[Option[Array[Byte]]]

Retrieve a key from the default ColumnFamily in the database.

Retrieve a key from the default ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def initialHandles: Task[List[ColumnFamilyHandle]]

Retrieves the list of ColumnFamily handles the database was opened with.

Retrieves the list of ColumnFamily handles the database was opened with.

Caveats:

  • This list will only be populated if the database was opened with a specific list of column families.
  • The list will not be updated if column families are added/removed while the database is open.

Attributes

Inherited from:
RocksDB
def multiGetAsList(handles: List[ColumnFamilyHandle], keys: List[Array[Byte]]): Task[List[Option[Array[Byte]]]]

Retrieve multiple keys from specific ColumnFamilies in the database. The resulting list corresponds (positionally) to the list of keys passed to the function.

Retrieve multiple keys from specific ColumnFamilies in the database. The resulting list corresponds (positionally) to the list of keys passed to the function.

Attributes

Inherited from:
RocksDB
def multiGetAsList(keys: List[Array[Byte]]): Task[List[Option[Array[Byte]]]]

Retrieve multiple keys from the default ColumnFamily in the database. The resulting list corresponds (positionally) to the list of keys passed to the function.

Retrieve multiple keys from the default ColumnFamily in the database. The resulting list corresponds (positionally) to the list of keys passed to the function.

Attributes

Inherited from:
RocksDB
def newIterator(cfHandle: ColumnFamilyHandle, direction: Direction, position: Position): Stream[Throwable, (Array[Byte], Array[Byte])]

Scans a specific ColumnFamily in the database by specifying direction and position and emits the results as a ZStream.

Scans a specific ColumnFamily in the database by specifying direction and position and emits the results as a ZStream.

Attributes

Inherited from:
RocksDB
def newIterator(cfHandle: ColumnFamilyHandle): Stream[Throwable, (Array[Byte], Array[Byte])]

Scans a specific ColumnFamily in the database and emits the results as a ZStream.

Scans a specific ColumnFamily in the database and emits the results as a ZStream.

Attributes

Inherited from:
RocksDB
def newIterator(direction: Direction, position: Position): Stream[Throwable, (Array[Byte], Array[Byte])]

Scans the default ColumnFamily in the database and emits the results as a ZStream.

Scans the default ColumnFamily in the database and emits the results as a ZStream.

Attributes

Inherited from:
RocksDB
def newIterator: Stream[Throwable, (Array[Byte], Array[Byte])]

Scans the default ColumnFamily in the database and emits the results as a ZStream.

Scans the default ColumnFamily in the database and emits the results as a ZStream.

Attributes

Inherited from:
RocksDB
def newIterators(cfHandles: List[ColumnFamilyHandle]): Stream[Throwable, (ColumnFamilyHandle, Stream[Throwable, (Array[Byte], Array[Byte])])]

Scans multiple ColumnFamilies in the database and emits the results in multiple streams, whereas the streams themselves are also emitted in a ZStream.

Scans multiple ColumnFamilies in the database and emits the results in multiple streams, whereas the streams themselves are also emitted in a ZStream.

Attributes

Inherited from:
RocksDB
def put(cfHandle: ColumnFamilyHandle, key: Array[Byte], value: Array[Byte]): Task[Unit]

Writes a key to a specific ColumnFamily in the database.

Writes a key to a specific ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def put(key: Array[Byte], value: Array[Byte]): Task[Unit]

Writes a key to the default ColumnFamily in the database.

Writes a key to the default ColumnFamily in the database.

Attributes

Inherited from:
RocksDB
def write(writeOptions: WriteOptions, writeBatch: WriteBatch): Task[Unit]

Attributes

Inherited from:
RocksDB