mirror of
https://github.com/pikami/cosmium.git
synced 2026-11-12 21:42:15 +00:00
Honor If-Match when deleting documents (#21)
Compare the document ETag and delete it in one datastore operation so a stale If-Match returns 412 and leaves the newer document in place. Co-authored-by: Cursor Agent <[email protected]>
This commit is contained in:
1 parent
af271092c3
commit
2fddaf7498
6 files changed
+185
-14
No files matched your search
@@ -11,12 +11,13 @@ type Database struct {
|
||||
type DataStoreStatus int
|
||||
|
||||
const (
|
||||
StatusOk DataStoreStatus = 1
|
||||
StatusNotFound DataStoreStatus = 2
|
||||
Conflict DataStoreStatus = 3
|
||||
BadRequest DataStoreStatus = 4
|
||||
IterEOF DataStoreStatus = 5
|
||||
Unknown DataStoreStatus = 6
|
||||
StatusOk DataStoreStatus = 1
|
||||
StatusNotFound DataStoreStatus = 2
|
||||
Conflict DataStoreStatus = 3
|
||||
BadRequest DataStoreStatus = 4
|
||||
IterEOF DataStoreStatus = 5
|
||||
Unknown DataStoreStatus = 6
|
||||
PreconditionFailed DataStoreStatus = 7
|
||||
)
|
||||
|
||||
type TriggerOperation string
|
||||
|
||||
Reference in new issue
Block a user