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
// db is initialized using pre-existing .db file, which had 3 rows in 'users' table// insert a new row in 'users' tablevarstmt=db.prepare("SELECT * FROM users;");while(stmt.step()){// prints out 4 users in consolevarrow=stmt.getAsObject();console.log(row);}vardata=db.export();db=newSQL.Database(data);stmt=db.prepare("SELECT * FROM users;");while(stmt.step()){// prints out 3 users in consolevarrow=stmt.getAsObject();console.log(row);}
So, the problem is:
I export the database
I create a new database using the data that I got by exporting the original db
the new database does not have all the data inside that the original database had.
Why does this happen?
I would like to have an 'export()' method that behaves like:
db <is_equal_to> new SQL.Database(db.export())
The problem is most certainly in db.export()... The modifications I made on the original db object are not taken into consideration when calling db.export()
The text was updated successfully, but these errors were encountered:
I appear to have the same problem as the one posted a couple of years ago
https://github.com/kripken/sql.js/issues/9
My code goes as follows.
So, the problem is:
Why does this happen?
I would like to have an 'export()' method that behaves like:
db <is_equal_to> new SQL.Database(db.export())
The problem is most certainly in db.export()... The modifications I made on the original db object are not taken into consideration when calling db.export()
The text was updated successfully, but these errors were encountered: