package dynamodb
- Alphabetic
- By Inheritance
- dynamodb
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class AttrMap(map: Map[String, AttributeValue]) extends GeneratedFromAttributeValueAs with Product with Serializable
- final case class AttributeDefinition extends Product with Serializable
- sealed trait AttributeValue extends AnyRef
- sealed trait AttributeValueType extends AnyRef
- sealed trait BillingMode extends AnyRef
- sealed trait ConditionExpression[-From] extends Renderable
- sealed trait ConsistencyMode extends AnyRef
- sealed trait DatabaseError extends Exception
- type Decoder[+A] = (AttributeValue) => Either[DynamoDBError, A]
- sealed trait DynamoDBBatchError extends Throwable with NoStackTrace with Product with Serializable
- sealed trait DynamoDBError extends Throwable with NoStackTrace with Product with Serializable
- trait DynamoDBExecutor extends AnyRef
- sealed trait DynamoDBQuery[-In, +Out] extends AnyRef
- type Encoder[A] = (A) => AttributeValue
- type FilterExpression[-From] = ConditionExpression[From]
- trait FromAttributeValue[+A] extends AnyRef
- final case class GlobalSecondaryIndex(indexName: String, keySchema: KeySchema, projection: ProjectionType, provisionedThroughput: Option[ProvisionedThroughput] = None) extends Product with Serializable
- type Item = AttrMap
- sealed trait KeyConditionExpr[-From] extends Renderable
This sum type models: 1) partition key equality expressions 2) composite primary key expressions where sort key expression is equality 3) extended composite primary key expressions where sort key is not equality eg >, <, >=, <=, between, begins_with
This sum type models: 1) partition key equality expressions 2) composite primary key expressions where sort key expression is equality 3) extended composite primary key expressions where sort key is not equality eg >, <, >=, <=, between, begins_with
Note 1), 2) and 3) are all valid key condition expressions used in Query DynamoDB queries BUT only 1) and 2) are valid primary key expressions that can be used in GetItem, UpdateItem and DeleteItem DynamoDB queries
- final case class KeySchema extends Product with Serializable
- type LastEvaluatedKey = Option[PrimaryKey]
- final case class LocalSecondaryIndex(indexName: String, keySchema: KeySchema, projection: ProjectionType) extends Product with Serializable
- type PkAndItem = (PrimaryKey, Item)
- type PrimaryKey = AttrMap
- sealed trait PrimitiveValueType extends AttributeValueType
- sealed trait ProjectionExpression[-From, +To] extends AnyRef
- trait ProjectionExpressionLowPriorityImplicits0 extends ProjectionExpressionLowPriorityImplicits1
- trait ProjectionExpressionLowPriorityImplicits1 extends AnyRef
- sealed trait ProjectionType extends AnyRef
- final case class ProvisionedThroughput(readCapacityUnit: Long, writeCapacityUnit: Long) extends Product with Serializable
- sealed trait ReturnConsumedCapacity extends AnyRef
- sealed trait ReturnItemCollectionMetrics extends AnyRef
- sealed trait ReturnValues extends AnyRef
- final case class SSESpecification(enable: Boolean = false, kmsMasterKeyId: Option[String] = None, sseType: SSEType) extends Product with Serializable
- sealed trait Select extends AnyRef
- type TableNameAndPK = (String, String)
- trait TestDynamoDBExecutor extends AnyRef
A Fake implementation of
DynamoDBExecutor.Servicethat currently has the very modest aspiration of providing bare minimum functionality to enable internal unit tests and to enable simple end to end examples that can serve as documentation.A Fake implementation of
DynamoDBExecutor.Servicethat currently has the very modest aspiration of providing bare minimum functionality to enable internal unit tests and to enable simple end to end examples that can serve as documentation. Limited CRUD functionality is supported hence some features are currently not supported or have restrictions.- Supported
- CRUD operations GetItem, PutItem, DeleteItem, BatchGetItem, BatchWriteItem
- Limited support
- Primary Keys - only the partition key can be specified and is only checked for equality
- Not currently supported
- Projections - all fields are returned for all queries
- Expressions - these include
KeyConditionExpression's,ConditionExpression's,ProjectionExpression's,UpdateExpression's - Create table, Delete table
- UpdateItem - this is a more complex case as it uses an expression to specify the update
- Indexes in ScanSome, ScanAll, QuerySome, QueryAll
Usage:
DynamoDBExecutor.testprovides you the test DB instance in aZLayer. Tables are created using theaddTablemethod in the test controller serviceTestDynamoDBExecutor. You specify a table, a single primary and a var arg list of primary key/item pairs.testM("getItem") { for { _ <- TestDynamoDBExecutor.addTable("tableName1", primaryKeyFieldName = "k1", primaryKey1 -> item1, primaryKey1_2 -> item1_2) result <- GetItem(key = primaryKey1, tableName = tableName1).execute expected = Some(item1) } yield assert(result)(equalTo(expected)) }.provideLayer(DynamoDBExecutor.test)
- Supported
- trait ToAttributeValue[A] extends AnyRef
- trait ToAttributeValueLowPriorityImplicits0 extends ToAttributeValueLowPriorityImplicits1
- trait ToAttributeValueLowPriorityImplicits1 extends AnyRef
- final case class UpdateExpression[-A](action: Action[A]) extends Renderable with Product with Serializable
- sealed trait Zippable[-A, -B] extends AnyRef
- trait ZippableLowPriority1 extends ZippableLowPriority2
- trait ZippableLowPriority2 extends ZippableLowPriority3
- trait ZippableLowPriority3 extends ZippableLowPriority4
- trait ZippableLowPriority4 extends AnyRef
Value Members
- val Item: AttrMap.type
- val PrimaryKey: AttrMap.type
- def batchReadFromStream[R, A, From](tableName: String, stream: ZStream[R, Throwable, A], mPar: Int = 10)(pk: (A) => PrimaryKeyExpr[From])(implicit arg0: Schema[From]): ZStream[R with DynamoDBExecutor, Throwable, Either[DecodingError, (A, Option[From])]]
Reads
streamusing functionpkto determine the primary key which is then used to create a BatchGetItem request.Reads
streamusing functionpkto determine the primary key which is then used to create a BatchGetItem request. Stream is batched into groups of 100 items in a BatchGetItem and executed using the providedDynamoDBExecutorservice Returns a tuple of (A, Option[B]) where the option is None if the item is not found - this enables "LEFT outer join" like functionality- R
Environment
- A
Input stream element type
- mPar
Level of parallelism for the stream processing
- pk
Function to determine the primary key
- returns
stream of Either[DynamoDBError.DecodingError, (A, Option[B])]
- def batchReadItemFromStream[R, A](tableName: String, stream: ZStream[R, Throwable, A], mPar: Int = 10)(pk: (A) => PrimaryKey): ZStream[R with DynamoDBExecutor, Throwable, (A, Option[Item])]
Reads
streamusing functionpkto determine the primary key which is then used to create a BatchGetItem request.Reads
streamusing functionpkto determine the primary key which is then used to create a BatchGetItem request. Stream is batched into groups of 100 items in a BatchGetItem and executed using the providedDynamoDBExecutorservice- R
Environment
- mPar
Level of parallelism for the stream processing
- pk
Function to determine the primary key
- returns
A stream of (A, Option[Item])
- def batchWriteFromStream[R, A, In, B](stream: ZStream[R, Throwable, A], mPar: Int = 10)(f: (A) => DynamoDBQuery[In, B]): ZStream[DynamoDBExecutor with R, Throwable, B]
Reads
streamand uses functionffor creating a BatchWrite request that is executes for side effects.Reads
streamand uses functionffor creating a BatchWrite request that is executes for side effects. Stream is batched into groups of 25 items in a BatchWriteItem and executed using theDynamoDBExecutorservice provided in the environment.- R
Environment
- B
Type of DynamoDBQuery returned by
f- mPar
Level of parallelism for the stream processing
- f
Function that takes an
Aand returns a PutItem or WriteItem- returns
A stream of results from the
DynamoDBQuerywrite's
- object AttrMap extends GeneratedAttrMapApplies with Serializable
- object AttributeDefinition extends Serializable
- object AttributeValue
- object AttributeValueType
- object BillingMode
- case object BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- object ConditionExpression
- object ConsistencyMode
- object DatabaseError extends Serializable
- object DynamoDBBatchError extends Serializable
- object DynamoDBError extends Serializable
- object DynamoDBExecutor
- case object DynamoDBExecutorImpl extends Product with Serializable
- object DynamoDBQuery
- object FromAttributeValue
- object KeyConditionExpr
- object KeySchema extends Serializable
- object ProjectionExpression extends ProjectionExpressionLowPriorityImplicits0
- object ProjectionType
- object ReturnConsumedCapacity
- object ReturnItemCollectionMetrics
- object ReturnValues
- object SSESpecification extends Serializable
- object Select
- object TestDynamoDBExecutor
- object ToAttributeValue extends ToAttributeValueLowPriorityImplicits0
- object UpdateExpression extends Serializable
- object Zippable extends ZippableLowPriority1