trait Table extends Queries
A key-value table.
Implementations have concrete key and value types, as well as queryable hash and range types.
Table returns DBActions that are pure values (DBOps that line inside Free) and can be chained together with map/flatMap (ie. there is a monad for DBAction.
You can get an interpreter for DBActions (to any arbitrary C[_]) by supplying a DBOp ~> C natural transformation.
- Alphabetic
- By Inheritance
- Table
- Queries
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed
trait
Query
extends AnyRef
- Definition Classes
- Queries
- type DBAction[A] = Free[DBOp, A]
- sealed trait DBOp [A] extends AnyRef
-
abstract
type
H
the Hash type
the Hash type
- Definition Classes
- Queries
- abstract type K
-
abstract
type
R
the Range type
the Range type
- Definition Classes
- Queries
- abstract type V
Value Members
-
object
Query
- Definition Classes
- Queries
- implicit val MonadDBAction: Monad[DBAction]
-
def
batchDelete(keys: List[K]): DBAction[Map[K, V]]
Perform a batch delete operation using the given keys.
Perform a batch delete operation using the given keys. DynamoDB has the following restrictions:
- we can only batch delete 25 items at a time
- keys
the keys to delete in the batch
- returns
Map of key -> values that failed to be deleted
-
def
batchPut(vals: Map[K, V]): DBAction[Map[K, V]]
Perform a batch put operation using the given key -> value pairs.
Perform a batch put operation using the given key -> value pairs. DynamoDB has the following restrictions:
- item size must be < 64kb
- we can only batch put 25 items at a time
- vals
the vals to put in the batch
- returns
Map of key -> values that failed to be saved
- def delete(k: K): DBAction[Unit]
- def get(k: K): DBAction[Option[V]]
- implicit def lift[A](op: DBOp[A]): DBAction[A]
- def put(k: K, v: V): DBAction[Result[V, Overwrite.type]]
- def putIfAbsent(k: K, v: V): DBAction[Result[V, Insert.type]]
- def query(q: Query): DBAction[dynamodb.Page[R, V]]
- def replace(k: K, old: V, v: V): DBAction[Result[V, Replace.type]]
- def tableExists: DBAction[Boolean]
-
def
transform[C[_]](op2c: ~>[DBOp, C])(implicit arg0: Monad[C]): ~>[DBAction, C]
Turn a natural transform from DBOp to C into a DBAction to C
- object DBOp