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
TLDR, ctx.DB.prepare('SELECT ?1').bind(1) produce Error Error: Error: RangeError: Too many parameter values were provided in local mode but it works in cloud version
Related issue (since miniflare use better-sqlite3): WiseLibs/better-sqlite3#576
(DB is D1 database)
(command line is: wrangler dev --local --persist)
The text was updated successfully, but these errors were encountered:
`better-sqlite3` expects parameters of the form `?1, ?2, ...` to be
bound as an object of the form `{ 1: params[0], 2: params[1], ...}`.
In #480, we accidentally removed the code that handled this case.
This PR adds it back, and lifts out some common functionality into a
`#prepareAndBind()` function. :)
Thanks @ruslantalpa for spotting the removed code.
Closes#526Closescloudflare/workers-sdk#2811Closescloudflare/workers-sdk#2887
Which Cloudflare product(s) does this pertain to?
D1
What version of
Wrangler
are you using?2.11.1
What operating system are you using?
Mac
Describe the Bug
TLDR,
ctx.DB.prepare('SELECT ?1').bind(1)
produce ErrorError: Error: RangeError: Too many parameter values were provided
in local mode but it works in cloud versionRelated issue (since miniflare use better-sqlite3): WiseLibs/better-sqlite3#576
(DB is D1 database)
(command line is:
wrangler dev --local --persist
)The text was updated successfully, but these errors were encountered: