Sqlite_orm: Question on using in memory db for examples/update.cpp

Created on 2 Sep 2019  路  9Comments  路  Source: fnc12/sqlite_orm

Hi there, I am trying out the examples/update.cpp. It works fine as-is. However, if I change to in memory db as follows

stor = std::make_unique(initStorage(":memory:"));

then it would throw exception on the first call of stor->replace().

In comparison, examples/in_memory.cpp works fine for me.

What is the difference in terms of using in-memory DB between the two examples?

thank you for your time and help.

question stranger things

All 9 comments

Yeah, I can reproduce it too. This is strange cause different example (iteration.cpp) works well with same steps. I need to investigate it more. Thank you

We are seeing the same issue after updating to the dev branch to use the new backup functionality. We had to work around it by always using files, which is fine, but destroys our performance, meaning we cannot release. Any idea on cause or estimate on fix?

I shall look through it in a few days. I am busy right now with reviewing the PR with code formatting and prepared statements feature. Sorry for waiting

I have gone through all of the examples in the dev branch, and I cannot get a single one to work when using the "initStorage" technique with an in memory database. They all work fine with a file. The call to sync_schema passes, but any CRUD method causes an exception with no such table: [table name]: SQL logic error.

oops. Looks like something critical. Thank you. I shall look through it today or tomorrow

bug is fixed. Please check out dev branch

Any release inc with this fix? @fnc12

@helmesjo yes, in a month

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steven-pearson picture steven-pearson  路  4Comments

fnc12 picture fnc12  路  12Comments

juandent picture juandent  路  5Comments

nfarid picture nfarid  路  8Comments

ncoder-1 picture ncoder-1  路  5Comments