zio.dynamodb
Members list
Packages
Type members
Classlikes
Attributes
- Companion
- class
- Supertypes
- Self type
-
AttributeDefinition.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- trait
- Supertypes
- Self type
-
AttributeValue.type
Attributes
- Companion
- trait
- Supertypes
- Self type
-
AttributeValueType.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object PayPerRequest
Attributes
- Companion
- trait
- Supertypes
- Self type
-
BillingMode.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConditionExpression[From]
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ConditionExpression.type
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ConsistencyMode.type
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class AWSErrortrait BatchErrorclass GetErrorclass WriteErrortrait ItemErrorclass DecodingErrorclass ValueNotFoundtrait TransactionErrorobject EmptyTransactionobject MixedTransactionTypesShow all
Attributes
- Companion
- trait
- Supertypes
- Self type
-
DynamoDBError.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DynamoDBExecutor.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
- Self type
-
Attributes
- Companion
- trait
- Supertypes
- Self type
-
DynamoDBQuery.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FromAttributeValue.type
This sum type models:
This sum type models:
- partition key equality expressions
- composite primary key expressions where sort key expression is equality
- 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
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait PrimaryKeyExpr[From]
- Self type
-
KeyConditionExpr[From]
Attributes
- Companion
- trait
- Supertypes
- Self type
-
KeyConditionExpr.type
Attributes
- Supertypes
- Known subtypes
- Self type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ProjectionExpression.type
Attributes
- Supertypes
- Known subtypes
-
object ProjectionExpression
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ProjectionType.type
Attributes
- Companion
- trait
- Supertypes
- Self type
Attributes
- Companion
- trait
- Supertypes
- Self type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion
- trait
- Supertypes
- Self type
-
ReturnValues.type
Attributes
- Companion
- class
- Supertypes
- Self type
-
SSESpecification.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
A Fake implementation of DynamoDBExecutor.Service
that 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.
A Fake implementation of DynamoDBExecutor.Service
that 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.test
provides you the test DB instance in a ZLayer
. Tables are created using the addTable
method in the test controller service TestDynamoDBExecutor
. 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)
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TestDynamoDBExecutor.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ToAttributeValue.type
Attributes
- Supertypes
- Known subtypes
-
object ToAttributeValue
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object ToAttributeValue
Attributes
- Companion
- object
- Supertypes
- Self type
Attributes
- Companion
- class
- Supertypes
- Self type
-
UpdateExpression.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
trait ZippableLowPriority1trait ZippableLowPriority2trait ZippableLowPriority3trait ZippableLowPriority4class Objecttrait Matchableclass AnyShow all
- Self type
-
Zippable.type
Attributes
- Supertypes
-
trait ZippableLowPriority2trait ZippableLowPriority3trait ZippableLowPriority4class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object Zippable
Attributes
- Supertypes
- Known subtypes
-
trait ZippableLowPriority1object Zippable
Attributes
- Supertypes
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Types
Value members
Concrete methods
Reads stream
using function pk
to 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 provided DynamoDBExecutor
service
Reads stream
using function pk
to 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 provided DynamoDBExecutor
service
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
Type parameters
- A
-
Input stream element type
- From
-
implicit Schema[From] where From is the type of the element in the returned stream
- R
-
Environment
Value parameters
- mPar
-
Level of parallelism for the stream processing
- pk
-
Function to determine the primary key
Attributes
- Returns
-
stream of Either[DynamoDBError.DecodingError, (A, Option[B])]
Reads stream
using function pk
to 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 provided DynamoDBExecutor
service.
Reads stream
using function pk
to 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 provided DynamoDBExecutor
service.
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
Type parameters
- R
-
Environment
Value parameters
- mPar
-
Level of parallelism for the stream processing
- pk
-
Function to determine the primary key
Attributes
- Returns
-
A stream of (A, Option[Item])
Reads stream
and uses function f
for creating a BatchWrite request that is executes for side effects. Stream is batched into groups of 25 items in a BatchWriteItem and executed using the DynamoDBExecutor
service provided in the environment.
Reads stream
and uses function f
for creating a BatchWrite request that is executes for side effects. Stream is batched into groups of 25 items in a BatchWriteItem and executed using the DynamoDBExecutor
service provided in the environment.
Note that if function f
returns a PutItem
or DeleteItem
that contains a ConditionExpression
then the entire aggregated chunk of up to 25 items will not be batched! (this is a limitation of AWS BatchWriteItem) - instead they will be executed in parallel.
Type parameters
- B
-
Type of DynamoDBQuery returned by
f
- R
-
Environment
Value parameters
- f
-
Function that takes an
A
and returns a PutItem or DeleteItem - mPar
-
Level of parallelism for the stream processing
Attributes
- Returns
-
A stream of results from the
DynamoDBQuery
write's