Skip to content

Commit

Permalink
Merge pull request #86 from minoritea/fix-d1-query-context
Browse files Browse the repository at this point in the history
D1 driver would cause panic when QueryContext is called with parameters
  • Loading branch information
syumai authored Jan 11, 2024
2 parents 1ccb909 + a8b9ac4 commit a64f77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudflare/d1/stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (s *stmt) Query([]driver.Value) (driver.Rows, error) {
func (s *stmt) QueryContext(_ context.Context, args []driver.NamedValue) (driver.Rows, error) {
argValues := make([]any, len(args))
for i, arg := range args {
argValues[i] = arg
argValues[i] = arg.Value
}
resultPromise := s.stmtObj.Call("bind", argValues...).Call("all")
rowsObj, err := jsutil.AwaitPromise(resultPromise)
Expand Down

0 comments on commit a64f77a

Please sign in to comment.