set Upsert Mask
abstract fun <E : Any> setUpsertMask(vararg props: TypedProp.Single<E, *>)
Content copied to clipboard
Set UpsertMask with updatable properties
When upsert is executed, existing rows will be updated. By default, the properties is determined by object shape
updatedProperties = propertiesOf(dynamicEntity) - conflictIdOrKeyContent copied to clipboard
If the UpsertMask is specified,
updatedProperties = (
propertiesOf(dynamicEntity) - conflictIdOrKey
) & upsertMask.updatablePropsContent copied to clipboard
Parameters
props
Properties that can be updated
- its length cannot be 0
- all properties must belong to one entity typeContent copied to clipboard
Set UpsertMask object
When upsert is executed, existing rows will be updated and non-existing rows will be inserted. By default, the properties is determined by object shape
insertedProperties = propertiesOf(dynamicEntity)
updatedProperties = propertiesOf(dynamicEntity) - conflictIdOrKeyContent copied to clipboard
If the UpsertMask is specified,
insertedProperties = (
propertiesOf(dynamicEntity) & upsertMask.insertableProps
) + conflictIdOrKey
updatedProperties = (
propertiesOf(dynamicEntity) - conflictIdOrKey
) & upsertMask.updatablePropsContent copied to clipboard
Parameters
mask
The upsert mask object, it cannot be null