You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where v = (select version+1 v from snapshots where collection = $1 and doc_id = $2 for update) or not exists (select 1 from snapshots where collection = $1 and doc_id = $2 for update)
51
-
On conflict(collection, doc_id) do update set version = $3, data = $5 , doc_type = $4
52
-
Returning version
53
-
)
54
-
Insert into ops (collection,doc_id, version,operation)
where (v = (select max(version)+1 v from ops where collection = $1 and doc_id = $2) or not exists (select 1 from ops where collection = $1 and doc_id = $2 for update)) and exists (select 1 from snaps)
58
-
Returning version`,
65
+
text: `WITH snapshot_id AS (
66
+
INSERT INTO snapshots (collection, doc_id, doc_type, version, data)
0 commit comments