space
exists
Check whether a product space exists on a branch.
strata space existsdb.spaces.exists(name: 'str') -> 'bool'wire space_exists
Reports whether the named product space is cataloged on the target branch. A missing space is `false`, not an error; reserved names are rejected with `invalid_argument.engine.product_space_reserved`.
Status commands return a scalar or compact status payload and do not mutate database state.
To see the complete help for this command, run:
strata space exists --helphelp(db.spaces.exists)
Example
Check whether a product space exists.
strata space create appstrata space exists appstrata space exists nope
_ = db.spaces.create("app")db.spaces.exists("app")db.spaces.exists("nope")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| space | string | yes | Product space name. |
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
Returns
StatusValue<bool>
- databoolean
- 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 |