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
In prepared statements, dates (and other data types) are serialised using JSON.stringify. The date values are stringified using Date.prototype.toISOString() fn. See MDN. Everything works fine, as long as the resulting format is YYYY-MM-DDTHH:mm:ss.sssZ or -YYYYYY-MM-DDTHH:mm:ss.sssZ. The things brake when the resulting format is +YYYYYY-MM-DDTHH:mm:ss.sssZ.
To Reproduce
constconnection=awaitduckdbInstance.connect();conststatement=awaitconnection.prepare(` SELECT CAST(? AS DATE)`);// the following throwsconstresult=awaitstatement.query(newDate(Date.UTC(10000,0,1)));
What happens?
In prepared statements, dates (and other data types) are serialised using
JSON.stringify
. The date values are stringified usingDate.prototype.toISOString()
fn. See MDN. Everything works fine, as long as the resulting format isYYYY-MM-DDTHH:mm:ss.sssZ
or-YYYYYY-MM-DDTHH:mm:ss.sssZ
. The things brake when the resulting format is+YYYYYY-MM-DDTHH:mm:ss.sssZ
.To Reproduce
Please see an example in Codesandbox.
Browser/Environment:
Any
Device:
Any
DuckDB-Wasm Version:
1.28.1-dev242.0
DuckDB-Wasm Deployment:
N/A
Full Name:
Katarina Anton
Affiliation:
Individual
The text was updated successfully, but these errors were encountered: