Spaces commands
4 commands. Each entry gives the invocation and an example, in the interface you pick; open the details for parameters, return shape and error codes.
create
Create a product space on a branch.
strata space create
db.spaces.create(name: 'str') -> 'Any'
Creates a product space in the branch catalog. Creation is idempotent: creating a space that already exists succeeds with `created: false` and no mutation effect. Names reserved for engine control data are rejected with `invalid_argument.engine.product_space_reserved`.
To see the complete help for this command, run:
strata space create --helphelp(db.spaces.create)
Example
strata space create appstrata space list
_ = db.spaces.create("app")sorted(db.spaces.list())
delete
Delete a product space from a branch.
strata space delete
db.spaces.delete(name: 'str', *, force: 'bool' = False) -> 'Any'
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`.
To see the complete help for this command, run:
strata space delete --helphelp(db.spaces.delete)
Example
strata space create tempstrata space delete tempstrata space exists temp
_ = db.spaces.create("temp")_ = db.spaces.delete("temp")db.spaces.exists("temp")
exists
Check whether a product space exists on a branch.
strata space exists
db.spaces.exists(name: 'str') -> 'bool'
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`.
To see the complete help for this command, run:
strata space exists --helphelp(db.spaces.exists)
Example
strata space create appstrata space exists appstrata space exists nope
_ = db.spaces.create("app")db.spaces.exists("app")db.spaces.exists("nope")
list
List product spaces on a branch.
strata space list
db.spaces.list() -> 'list'
Lists the product space names cataloged on the target branch as a terminal page. Every branch has a `default` space; additional spaces isolate data namespaces within the same branch.
To see the complete help for this command, run:
strata space list --helphelp(db.spaces.list)
Example
strata space create appstrata space list
_ = db.spaces.create("app")sorted(db.spaces.list())