space
delete
Delete a product space from a branch.
strata space deletedb.spaces.delete(name: 'str', *, force: 'bool' = False) -> 'Any'wire space_delete
Drops the product space from the branch catalog. The `default` space refuses deletion with `invalid_argument.engine.space_delete_default`. A space that still contains visible data refuses deletion with `failed_precondition.engine.space_not_empty` unless `force: true` is set, which tombstones the visible rows first and reports the count. Deleting a space that does not exist succeeds with `deleted: false`.
Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.
To see the complete help for this command, run:
strata space delete --helphelp(db.spaces.delete)
Example
Delete a product space.
strata space create tempstrata space delete tempstrata space exists temp
_ = db.spaces.create("temp")_ = db.spaces.delete("temp")db.spaces.exists("temp")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| space | string | yes | Product space name. |
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| force | boolean | no | Delete visible data in the space before dropping the catalog entry. |
Returns
MutationAck<SpaceDelete>
- dataobject
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |
| invalid_argument.engine.product_space_reserved | never | not_started |
| invalid_argument.engine.space_delete_default | never | not_started |
| failed_precondition.engine.space_not_empty | never | not_started |
| invalid_argument.engine.space_delete_too_large | never | not_started |