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
{{ message }}
Repository navigation
Support creating in-memory db on SQL file import #1765
Here is my use-case:
I use an In-memory Sqlite for XUnit tests in Visual Studio. I can easily debug my tests but I have no way to look at the DB Table, Columns and data created during running the unit test. any suggestion?
@FlippieCoetser That shared cache option is still for databases connections internal to a single program. It's what the documentation means a bit further down where it says:
Of course, all database connections sharing the in-memory database need to be in the same process.
Following up on this (way overdue!)... there's now an option in the File menu to create a new in-memory database. It's present in the 3.12.x series releases (which is only 3.12.0-alpha1 so far), and has been in our nightly builds for a while now too. 😄
Activity
justinclift commentedon Feb 24, 2019
Thanks @jsejcksn, seems like a reasonable idea. 😄
FlippieCoetser commentedon Nov 10, 2019
Creating a new In-memory database is possible, but connecting to an existing In-Memory Database not. It will be great have support for In-Memory DB.
justinclift commentedon Nov 10, 2019
When you say "existing in-memory database" are you meaning one created by another program?
If so, that's not possible. It's a limitation of SQLite itself, in that it can only connect to an in-memory database created by itself.
FlippieCoetser commentedon Nov 10, 2019
@jsejcksn I noticed a shared cache option in the documentation: https://www.sqlite.org/inmemorydb.html.
Here is my use-case:
I use an In-memory Sqlite for XUnit tests in Visual Studio. I can easily debug my tests but I have no way to look at the DB Table, Columns and data created during running the unit test. any suggestion?
jsejcksn commentedon Nov 10, 2019
@FlippieCoetser Just use an on-disk database instead of an in-memory one and delete it when you’re done.
justinclift commentedon Nov 11, 2019
@FlippieCoetser That shared cache option is still for databases connections internal to a single program. It's what the documentation means a bit further down where it says:
Of course, all database connections sharing the in-memory database need to be in the same process.justinclift commentedon May 18, 2020
Following up on this (way overdue!)... there's now an option in the File menu to create a new in-memory database. It's present in the 3.12.x series releases (which is only 3.12.0-alpha1 so far), and has been in our nightly builds for a while now too. 😄