EctoTablestore.Repo.delete
You're seeing just the callback
delete
, go back to EctoTablestore.Repo module for more information.
Specs
delete(schema_or_changeset(), options()) :: {:ok, schema()} | {:error, term()}
Delete a struct using its primary key.
Options
:condition
, this option is required, whether to add conditional judgment before data delete.
Two kinds of update condition types as below:
As `condition(:expect_exist)` means the primary key(s) can match a row to delete, we also can add
some compare expressions for the attribute columns, e.g.
1. condition(:expect_exist, "attr1" == value1 and "attr2" > 1)
2. condition(:expect_exist, "attr1" != value1)
3. condition(:expect_exist, "attr1" > 100 or "attr2" < 1000)
As `condition(:ignore)` means DO NOT do any condition validation before delete.
:transaction_id
, delete under local transaction in a partition key.:stale_error_field
- The field where stale errors will be added in the returning changeset. This option can be used to avoid raisingEcto.StaleEntryError
.:stale_error_message
- The message to add to the configured:stale_error_field
when stale errors happen, defaults to "is stale".