Is it possible to load a sqlite database in dart completely from memory?
I am using the sqflite library:
https://pub.dev/packages/sqflite
When opening a database it takes a path to a file:
var databasesPath = await getDatabasesPath();
String path = join(databasesPath, 'demo.db');
I am only reading from the database, never writing to it. I would like to read the database from the file, and then not have sqlite have the file open anymore.
There is an inMemoryDatabasePath property: https://pub.dev/documentation/sqflite_common/latest/sqlite_api/inMemoryDatabasePath-constant.html
but that appears to only be for creating a new empty database in memory.
So, my question is whether it is possible to completely open a sqlite database and load it into memory?
If not, would it be possible to create an in-memory database, and then copy all of the data into it? similar to this:
How to copy a sqlite table from a disk database to a memory database in python?
(if so, anyone know what would be the equivalent sql commands in dart / sqflite)?