StoreIndex

org.sigilaris.node.jvm.storage.StoreIndex
trait StoreIndex[F[_], K, V] extends KeyValueStore[F, K, V]

Ordered key-value store that supports range queries starting from a given key.

Type parameters

F

the effect type

K

the key type (must have an ordering for range queries)

V

the value type

Attributes

Source
StoreIndex.scala
Graph
Supertypes
trait KeyValueStore[F, K, V]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def from(key: K, offset: Int, limit: Int): EitherT[F, DecodeFailure, List[(K, V)]]

Returns a paginated list of key-value pairs starting from the given key.

Returns a paginated list of key-value pairs starting from the given key.

Value parameters

key

the starting key (inclusive)

limit

maximum number of entries to return

offset

number of entries to skip from the starting key

Attributes

Returns

a list of key-value pairs in key order

Source
StoreIndex.scala

Inherited and Abstract methods

def get(key: K): EitherT[F, DecodeFailure, Option[V]]

Retrieves the value associated with the given key.

Retrieves the value associated with the given key.

Value parameters

key

the key to look up

Attributes

Returns

the value if found, or None

Inherited from:
KeyValueStore
Source
KeyValueStore.scala
def put(key: K, value: V): F[Unit]

Associates the given value with the given key, overwriting any existing mapping.

Associates the given value with the given key, overwriting any existing mapping.

Value parameters

key

the key

value

the value to store

Attributes

Inherited from:
KeyValueStore
Source
KeyValueStore.scala
def remove(key: K): F[Unit]

Removes the mapping for the given key, if it exists.

Removes the mapping for the given key, if it exists.

Value parameters

key

the key to remove

Attributes

Inherited from:
KeyValueStore
Source
KeyValueStore.scala