Attribute

class Attribute<FINAL>(val dataType: DynamoDataType, meta: Meta, get: (Item) -> FINAL, lensSet: (FINAL, Item) -> Item, ignoreNull: Boolean = false) : Lens<Item, FINAL> , LensInjector<FINAL, Item>

Constructs typesafe Lenses for the various Item/Key attributes. The lenses can be used to inject values with Item(attr of "123") or extract with attr(item).

Constructors

Link copied to clipboard
constructor(dataType: DynamoDataType, meta: Meta, get: (Item) -> FINAL, lensSet: (FINAL, Item) -> Item, ignoreNull: Boolean = false)

Types

Link copied to clipboard
open class AttrLensSpec<OUT>(dataType: DynamoDataType, get: LensGet<Item, OUT>, set: LensSet<Item, OUT>) : LensSpec<Item, OUT>
Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val meta: Meta
Link copied to clipboard

Functions

Link copied to clipboard

Used for creating tables

Link copied to clipboard

Used for creating tables

Link copied to clipboard
fun <OUT> Attribute<OUT?>.asRequired(description: String? = null, metadata: Map<String, Any> = emptyMap()): Attribute<OUT>
Link copied to clipboard

Return a correctly typed value for this attribute

Link copied to clipboard
open fun extract(target: Item): FINAL
Link copied to clipboard
open operator fun <R : Item> get(target: R): FINAL
Link copied to clipboard
open fun <R : Item> inject(value: FINAL, target: R): R
Link copied to clipboard
open operator override fun <R : Item> invoke(value: FINAL, target: R): R
open operator override fun invoke(target: Item): FINAL
Link copied to clipboard
open operator override fun iterator(): Iterator<Meta>
Link copied to clipboard
open infix fun <R : Item> of(value: FINAL): (R) -> R
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open operator fun <R : Item> set(target: R, value: FINAL): R
Link copied to clipboard
open override fun toString(): String