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
I see that using the db.insert()... you can insert an array of data, but how do that using db.query()...? I need to do this because I have custom ON DUPLICATE KEY UPDATE logic that I need to run. I've tried using .bind to insert multiple but that doesn't seem to work as it produces Failed to insert array: Db(InvalidQuery(RenderedError { errors: ["Unexpected token a parameter, expected ("], snippets: [Snippet { source: "INSERT INTO website (site, cralwed) VALUES $array", truncation: None, location: Location { line: 1, column: 44 }, offset: 43, length: 6, label: None, kind: Error }] }))
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I see that using the
db.insert()...
you can insert an array of data, but how do that usingdb.query()...
? I need to do this because I have customON DUPLICATE KEY UPDATE
logic that I need to run. I've tried using.bind
to insert multiple but that doesn't seem to work as it producesFailed to insert array: Db(InvalidQuery(RenderedError { errors: ["Unexpected token
a parameter, expected ("], snippets: [Snippet { source: "INSERT INTO website (site, cralwed) VALUES $array", truncation: None, location: Location { line: 1, column: 44 }, offset: 43, length: 6, label: None, kind: Error }] }))
Beta Was this translation helpful? Give feedback.
All reactions