Returns a boolean status for one JSON document key without loading the stored document.
Status commands return a scalar or compact status payload and do not mutate database state.
Examples
Check whether a document exists.
CLI
$ strata json set user $ {"name":"alice"}
$ strata json exists user
$ strata json exists absent
Wire
{"key":"user","path":"$","type":"json_set","value":{"name":"alice"}}
{"key":"user","type":"json_exists"}
{"key":"absent","type":"json_exists"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | string | yes | Document key. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
StatusValue<bool>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.json_document_id
Invocation
- CLI:
strata json exists - Wire type:
json_exists