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'm using random row ids as primary keys, my schema goes something like this:
CREATETABLEusers (
id INTEGERPRIMARY KEYNOT NULL,
-- ...
) STRICT, RANDOM ROWID;
And I have a query that looks like this (mind you that I'm using the default IntMode: "number" here):
constconn=createClient(connOptions)constsql=` SELECT * FROM users WHERE email = ?; `constresp=awaitconn.execute({ sql,args: [email]})
The problem is when I run the query this error is thrown:
245 |functionvalueFromSql(sqlValue, intMode) {
246 |if (typeof sqlValue === "bigint") {
247 |if (intMode === "number") {
248 |if (sqlValue < minSafeBigint || sqlValue > maxSafeBigint) {
249 | throw new RangeError("Received integer which cannot be safely represented as a JavaScript number");
^
RangeError: Received integer which cannot be safely represented as a JavaScript number
I tried changing the IntMode to bigint, but it converts INTEGER to bigint. Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
abdurahmanshiine
changed the title
Random row ids not working with IntMode "number"
Random row ids not working with IntMode "number"
Aug 11, 2024
abdurahmanshiine
changed the title
Random row ids not working with IntMode "number"RANDOM ROWIDs not working with IntMode "number"
Aug 11, 2024
abdurahmanshiine
changed the title
RANDOM ROWIDs not working with IntMode "number"RANDOM ROWIDs not working with IntMode: "number"Aug 11, 2024
abdurahmanshiine
changed the title
RANDOM ROWIDs not working with IntMode: "number"RANDOM ROWIDs not working with the default IntMode: "number"Aug 11, 2024
Hi there,
I'm using random row ids as primary keys, my schema goes something like this:
And I have a query that looks like this (mind you that I'm using the default
IntMode: "number"
here):The problem is when I run the query this error is thrown:
I tried changing the
IntMode
tobigint
, but it convertsINTEGER
to bigint. Any idea what I'm doing wrong?The text was updated successfully, but these errors were encountered: