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
importDatabasefrom"better-sqlite3";constdb=newDatabase(":memory:");// Out of memorydb.serialize({attached: "foobar"});// work as expected// db.serialize({ attached: "main" });
What I see
/home/********/node_modules/better-sqlite3/lib/methods/serialize.js:15
return this[cppdb].serialize(attachedName);
^
Error: Out of memory
Expected behavior
some error like schema not found.
The text was updated successfully, but these errors were encountered:
unsigned char* data = sqlite3_serialize(db->db_handle, *attached_name, &length, 0);
if (!data && length) {
ThrowError("Out of memory");
return;
}
So maybe the error message could be updated to be more generic.
some error like schema not found.
sqlite3_serialize does not provide this information and it does not seem to be trivial to get it (ChatGTP suggests parsing the result of PRAGMA database_list;)
My Env
Repro
What I see
Expected behavior
some error like
schema not found
.The text was updated successfully, but these errors were encountered: