jaydb_put
Create or update a document in JayDB with optimistic concurrency control. Use ifMatch ETag to avoid overwriting concurrent changes.
Instructions
Create or update a document with optimistic concurrency control (CAS)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The document path key, e.g. "users/123/profile" | |
| data | Yes | The document content (JSON object, array, or string) | |
| ifMatch | No | Expected ETag for optimistic locking (CAS). Rejects write if modified concurrently. | |
| namespace | No | Namespace name (defaults to JAYDB_NAMESPACE or "default") | |
| createOnly | No | If true, fails if document already exists (If-None-Match: *) |