[BUG]:LibSQL "insert" command returns a mistyped rowid
Closed this issue · 1 comments
benquan commented
What version of drizzle-orm
are you using?
0.34.1
What version of drizzle-kit
are you using?
0.25.0
Describe the Bug
I changed from better-sqlite3 to LibSQL
All seem to work pretty much the same, but when doing an insert, for some reason libSQL is adding a "n" after the row ID.
for example I am doing this insert
const test = await db.insert(empresa).values({
mhPassword: '12345',
nit: '12345',
nombre: '12345',
dui: '12345'
});
the table has an autoincrementing id.
The result is:
ResultSetImpl {
columns: [],
columnTypes: [],
rows: [],
rowsAffected: 1,
lastInsertRowid: 12362n
}
Where I get 12362n instead of the expected 12362
In the database the ID has been properly recorded.
Ben
Expected behavior
ResultSetImpl {
columns: [],
columnTypes: [],
rows: [],
rowsAffected: 1,
lastInsertRowid: 12362
}
Environment & setup
I am working on sveltekit using node v20.12.0
benquan commented
My mistake. This is just the console.log representation of a bigint. It is just a number.