pass driver.NamedValue.Value as JS value instead of NamedValue itself

This commit is contained in:
Minori Tokuda 2024-01-10 23:50:54 +09:00
parent 1ccb9094e3
commit a8b9ac402e

View File

@ -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)