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
Whenever I use UPSERT statement, and the entry already exists ,I get the following error:
Uncaught ResponseError: There was a problem with a datastore transaction: An IndexedDB error occured: failed to execute indexed db request: ConstraintError: Key already exists in the object store.
Steps to reproduce
import{Surreal}from'surrealdb';import{surrealdbWasmEngines}from'@surrealdb/wasm';constdb=newSurreal({engines: surrealdbWasmEngines({strict: false,capabilities: {guest_access: true,functions: true,network_targets: true,},}),});awaitdb.connect(`test://ns/db`);awaitdb.use({namespace: 'ns',database: 'db',});awaitdb.query('UPSERT _:1 SET q = 1;');awaitdb.query('UPSERT _:1 SET q = 2;');// fails
Describe the bug
Whenever I use
UPSERT
statement, and the entry already exists ,I get the following error:Steps to reproduce
Expected behaviour
Should update on matching id
SurrealDB version
"surrealdb": "^1.0.6", "@surrealdb/wasm": "^1.0.2"
Contact Details
[email protected]
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: