From 6f83c5f3394bfe8a7efb9c6d1f46e7a71e0167a9 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Fri, 26 May 2023 16:45:22 +0000 Subject: [PATCH] Remove Transaction --- wasm/collective.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/wasm/collective.go b/wasm/collective.go index 3ce0c125..e99f03ae 100644 --- a/wasm/collective.go +++ b/wasm/collective.go @@ -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. -- GitLab