Skip to content

//tempest2/app.cash.tempest2/LogicalTable

LogicalTable

[jvm]\ interface LogicalTable<RI : Any> : View<RI, RI> , InlineView.Factory, SecondaryIndex.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 fun delete(item: RI): RI?
[jvm]
abstract 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.
deleteKey [jvm]
open fun deleteKey(key: RI): RI?
[jvm]
abstract 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.
inlineView [jvm]
abstract fun <K : Any, I : Any> inlineView(keyType: KClass<K>, itemType: KClass<I>): InlineView<K, I>
load [jvm]
open fun load(key: RI): RI?
abstract fun load(key: RI, consistentReads: Boolean = false, returnConsumedCapacity: ReturnConsumedCapacity = ReturnConsumedCapacity.TOTAL): Pair<RI?, ConsumedCapacity?>
[jvm]
abstract 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.
save [jvm]
open fun save(item: RI)
[jvm]
abstract fun save(item: RI, saveExpression: Expression? = null)
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.
secondaryIndex [jvm]
abstract fun <K : Any, I : Any> secondaryIndex(keyType: KClass<K>, itemType: KClass<I>): SecondaryIndex<K, I>