-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Describe the bug
Im running SurrealDB 3.0.0 with SurrealDB's npm package version 2.0.0-beta.2.
My question is in regards to create function that is provided. In this beta version the second argument of data is removed, and is instead replace with .content(..) after the create is called. There is no documentation that i have found that explains this but based on logic and reasoning, thats what ive assumed. I continuously keep getting this error Cannot execute CREATE statement using value: { }. Ive tried many different ways of setting it up, and im just lost what its complaining about. If someone could give me an example of it being correct and working and/or clarify that this is an actual bug, that would be great.
Steps to reproduce
Create a table called test in your database and setup the access tokens and connection system and assign the database connection to the variable called 'database'.
An example of what isn't working:
const test = await database.create(new RecordId('test', "temp")).content({
test:"test"
});Expected behaviour
I expect it to create a record with the id 'temp' on table 'test' with the following data:
- test: "test"
SurrealDB version
SurrealDB 3.0.0
JavaScript SDK version
2.0.0-beta.2
Contact Details
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct (repository /surrealdb.js)
- I agree to follow this project's Code of Conduct