DocumentValueConverter

class DocumentValueConverter(numberValueConverter: ValueConverter<Number> = NumberValueConverters.Auto, stringValueConverter: ValueConverter<String> = StringValueConverter, booleanValueConverter: ValueConverter<Boolean> = BooleanValueConverter, nullValueConverter: ValueConverter<Nothing?> = NullValueConverter, attributeValueListValueConverter: ValueConverter<List<AttributeValue>> = AttributeValueListValueConverter, attributeValueMapValueConverter: ValueConverter<Map<String, AttributeValue>> = AttributeValueMapValueConverter) : DocumentConverterBase, Converter<Document?, AttributeValue>

Converts between Document? and various DynamoDB attribute value types.

Constructors

Link copied to clipboard
constructor(numberValueConverter: ValueConverter<Number> = NumberValueConverters.Auto, stringValueConverter: ValueConverter<String> = StringValueConverter, booleanValueConverter: ValueConverter<Boolean> = BooleanValueConverter, nullValueConverter: ValueConverter<Nothing?> = NullValueConverter, attributeValueListValueConverter: ValueConverter<List<AttributeValue>> = AttributeValueListValueConverter, attributeValueMapValueConverter: ValueConverter<Map<String, AttributeValue>> = AttributeValueMapValueConverter)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun convertLeft(from: AttributeValue): Document?
Link copied to clipboard
open override fun convertRight(from: Document?): AttributeValue

Inherited functions

Link copied to clipboard
fun <V : Any> ValueConverter<V>.asNullable(nullValueConverter: ValueConverter<Nothing?> = NullValueConverter): ValueConverter<V?>
Link copied to clipboard
fun <T, PK : KeyType> ItemConverter<T>.withKeySpec(partitionKey: KeySpec<PK>, attributes: Attributes = emptyAttributes()): ItemSchema.PartitionKey<T, PK>

Associate this ItemConverter with a KeySpec for a partition key to form a complete ItemSchema

fun <T, PK : KeyType, SK : KeyType> ItemConverter<T>.withKeySpec(partitionKey: KeySpec<PK>, sortKey: KeySpec<SK>, attributes: Attributes = emptyAttributes()): ItemSchema.CompositeKey<T, PK, SK>

Associate this ItemConverter with KeySpec instances for a composite key to form a complete ItemSchema