StorageUtils

io.github.positionpal.location.storage.StorageUtils
trait StorageUtils

A trait that provides utility methods for storage operations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def batch(statements: List[SimpleStatement]): SimpleStatement

Creates a new instance of a Cassandra batch statement.

Creates a new instance of a Cassandra batch statement.

Value parameters

statements

the list of statements to include in the batch

Attributes

Returns

a new instance of SimpleStatement representing a batch statement

def cql(query: String, values: Any*): SimpleStatement

Creates a new instance of a Cassandra CQL statement.

Creates a new instance of a Cassandra CQL statement.

Value parameters

query

the CQL query string

values

the values to bind to the query

Attributes

Returns

a new instance of SimpleStatement

def executeWithErrorHandling[F[_] : Async, T](operation: => Future[T]): F[T]

Executes an operation with error handling.

Executes an operation with error handling.

Type parameters

F

the Async effect type

T

the return type of the operation

Value parameters

operation

the operation to execute which may throw an exception

Attributes

Returns

the result of the operation or a DatabaseError encapsulated in the F effect if an exception is thrown