Skip to content

UpsertChildByKeyOptions

Describes the child for BaseWriteItem.upsertChildByKey.

readonly optional initialState?: string

The initial state for a newly created child, which must be marked initial on the Template. An existing child keeps its state.

The Template's default state

UpsertChildByKeyOptionsBase.initialState


readonly optional key?: string

The child’s key relative to the parent. The call is rejected when the key is missing or invalid.


readonly optional onConflict?: "merge" | "ignore"

The conflict policy: 'merge' writes the supplied Properties to the existing child, 'ignore' leaves it untouched. Either way the existing child is returned.

'merge'

UpsertOptionsBase.onConflict


readonly optional properties?: Record<string, any>

Property values keyed by Property key, stored on a new child or written to an existing one under 'merge'.

{}

UpsertChildByKeyOptionsBase.properties