Skip to content

//tempest2/app.cash.tempest2/Attribute

Attribute

[jvm]\ @Target(allowedTargets = [AnnotationTarget.PROPERTY, AnnotationTarget.FIELD])

annotation class Attribute(val name: String = "", val names: Array<String> = [], val prefix: String = "", val allowEmpty: Boolean = false)

Maps an item class property to one or more attributes in a DynamoDB table.

If this mapped to a primary range key, it must have a prefix. Tempest automatically adds the prefix before database writes and removes it after database reads.

Properties

Name Summary
allowEmpty [jvm]
val allowEmpty: Boolean = false
Allows a nullable field with a prefix to be null when serializing. If this is false the prefix will be added to the field even when it is null.
name [jvm]
val name: String
names [jvm]
val names: Array<String>
prefix [jvm]
val prefix: String