Skip to content
Snippets Groups Projects
Commit 6f83c5f3 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Remove Transaction

parent 9b2fd36a
No related branches found
No related tags found
1 merge request!109Project/haven beta
......@@ -41,7 +41,6 @@ func newRemoteKvJS(api *bindings.RemoteKV) map[string]any {
"Root": js.FuncOf(rkv.Root),
"IsMemStore": js.FuncOf(rkv.IsMemStore),
"GetFullKey": js.FuncOf(rkv.GetFullKey),
"Transaction": js.FuncOf(rkv.Transaction),
"StoreMapElement": js.FuncOf(rkv.StoreMapElement),
"StoreMap": js.FuncOf(rkv.StoreMap),
"DeleteMapElement": js.FuncOf(rkv.DeleteMapElement),
......@@ -225,18 +224,6 @@ func (r *RemoteKV) GetFullKey(_ js.Value, args []js.Value) any {
return utils.CreatePromise(promiseFn)
}
// Transaction locks a key while it is being mutated then stores the result
// and returns the old value and if it existed in a JSON object.
// Transactions cannot be remote operations
// If the op returns an error, the operation will be aborted.
func (r *RemoteKV) Transaction(_ js.Value, args []js.Value) any {
promiseFn := func(resolve, reject func(args ...any) js.Value) {
reject("unimplemented")
}
return utils.CreatePromise(promiseFn)
}
// StoreMapElement stores a versioned map element into the KV. This relies
// on the underlying remote [KV.StoreMapElement] function to lock and control
// updates, but it uses [versioned.Object] values.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment