diff --git a/wasm/collective.go b/wasm/collective.go index 3ce0c1250059b6a91f27c7867d5775fe519e5930..e99f03aefab09cde52cde0107193033e6bb3ae16 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.