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
One error in the original SQL is a missing id column value that's required because it's defined as not null. Does this work for you with the id provided?
import{connect}from'@planetscale/database'constconfig={username: '<user>',host: '<host>',password: '<password>'}constconn=connect(config)constdocument=JSON.stringify({foo: 'bar'})constinsert=awaitconn.execute('insert into Redacted(id, `data`) values (?, ?)',[1,document])console.log(insert.statement)// => insert into Redacted(id, `data`) values (1, '{\"foo\":\"bar\"}')
When sending a JSON object or JSON stringified string I get the following errors. I can't tell if I should be doing something different.
JSON Object
JSON Stringified
Table Schema
The text was updated successfully, but these errors were encountered: