Skip to content

//tempest2/app.cash.tempest2/AsyncLogicalTable

AsyncLogicalTable

[jvm]\ interface AsyncLogicalTable<RI : Any> : AsyncView<RI, RI> , AsyncInlineView.Factory, AsyncSecondaryIndex.Factory

A collection of views on a DynamoDB table that makes it easy to model heterogeneous items using strongly typed data classes.

Types

Name Summary
Factory [jvm]
interface Factory

Functions

Name Summary
codec [jvm]
abstract fun <T : Any> codec(type: KClass<T>): Codec<T, RI>
type must be a key type or item type of one of the views of this table.
delete [jvm]
open suspend fun delete(item: RI, deleteExpression: Expression? = null): RI?
Deletes item from its DynamoDB table using deleteExpression. Any options specified in the deleteExpression parameter will be overlaid on any constraints due to versioned attributes.
deleteAsync [jvm]
open fun deleteAsync(item: RI): CompletableFuture<RI?>
abstract fun deleteAsync(item: RI, deleteExpression: Expression?): CompletableFuture<RI?>
deleteKey [jvm]
open suspend fun deleteKey(key: RI, deleteExpression: Expression? = null): RI?
Deletes the item identified by key from its DynamoDB table using deleteExpression. Any options specified in the deleteExpression parameter will be overlaid on any constraints due to versioned attributes.
deleteKeyAsync [jvm]
open fun deleteKeyAsync(key: RI): CompletableFuture<RI?>
abstract fun deleteKeyAsync(key: RI, deleteExpression: Expression?): CompletableFuture<RI?>
inlineView [jvm]
abstract fun <K : Any, I : Any> inlineView(keyType: KClass<K>, itemType: KClass<I>): AsyncInlineView<K, I>
load [jvm]
open suspend fun load(key: RI, consistentReads: Boolean = false): RI?
Returns an item whose keys match those of the prototype key object given, or null if no such item exists.
[jvm]
open suspend fun load(key: RI, consistentReads: Boolean = false, returnConsumedCapacity: ReturnConsumedCapacity = ReturnConsumedCapacity.TOTAL): Pair<RI?, ConsumedCapacity?>
loadAsync [jvm]
open fun loadAsync(key: RI): CompletableFuture<RI?>
abstract fun loadAsync(key: RI, consistentReads: Boolean): CompletableFuture<RI?>
abstract fun loadAsync(key: RI, consistentReads: Boolean, returnConsumedCapacity: ReturnConsumedCapacity): CompletableFuture<Pair<RI?, ConsumedCapacity?>>
save [jvm]
open suspend fun save(item: RI, saveExpression: Expression? = null): Void
Saves an item in DynamoDB. This method uses DynamoDbClient.putItem to clear and replace all attributes, including unmodeled ones, on save. Partial update, i.e. DynamoDbClient.updateItem, is not supported yet.
saveAsync [jvm]
open fun saveAsync(item: RI): CompletableFuture<Void>
abstract fun saveAsync(item: RI, saveExpression: Expression?): CompletableFuture<Void>
secondaryIndex [jvm]
abstract fun <K : Any, I : Any> secondaryIndex(keyType: KClass<K>, itemType: KClass<I>): AsyncSecondaryIndex<K, I>