从MMF接入的SQLite数据库 [英] Access SQLite db from MMF
问题描述
我用 System.Data.SQLite
lib目录访问我的SQLite数据库。我想将数据库文件加载到内存中,并使用MMF(内存映射文件)来访问数据库
I'm using System.Data.SQLite
lib to access my SQLite database. I want to load the db file to memory and use MMF (Memory Mapped Files) to access the database.
这可能使用默认的 SQLite的库?
编辑:
替代我如何能有一个内存数据库,欢迎
Alternatives on how I can have an in-memory database are welcome.
推荐答案
没有...
您可以:
-
创建一个内存数据库实例(指定的连接字符串
数据源=:内存:
)并装载从内容DB文件到该实例...当你改变内存中的实例,你的数据库文件将无法获得更新的内容...你可以以后保存在内存中的实例,内容为一个数据库文件...的做到这一点单向
create an in-memory DB instance (specify in connection string
Data Source=:memory:
) and load the contents from the DB file into that instance... when you change contents of the in-memory instance your DB file won't get updated... you could later on save the in-memory instance content into a DB file... one way to do this
使用RAM磁盘和数据库文件复制到RAM磁盘...
use a RAM disk and copy the db file into that RAM disk...
修改库的源代码,支持MMF
modify the source code of the library to support MMF
这篇关于从MMF接入的SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!