Saturday 31 August 2013

Is there an efficient way to snapshot in-memory sqlite database with System.Data.Sqlite?

Is there an efficient way to snapshot in-memory sqlite database with
System.Data.Sqlite?

I want to be able to go to and from a byte[] representation of an
in-memory SQLite database. The only solution I know of right now is using
SQLiteConnection.BackupDatabase method, which can copy an active in-memory
database to another database on disk. I can then load that database with
File.ReadAllBytes, but I find this approach terribly inefficient for my
needs.

No comments:

Post a Comment