Thanks. In writing the VFS, I see several function pointers that don't appear to have explanations. Can anyone help shed some light on what the following are supposed to do (and what their parameters are)?
>From http://sqlite.org/c3ref/vfs.html void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); void (*xDlClose)(sqlite3_vfs*, void*); int (*xGetLastError)(sqlite3_vfs*, int, char *); (The last one seems a bit self evident, but there was no documentation on it, either.) Thanks again! :) -Max --- On Thu, 5/20/10, Pavel Ivanov <[email protected]> wrote: From: Pavel Ivanov <[email protected]> Subject: Re: [sqlite] Loading Sqlite3 DB into memory To: "General Discussion of SQLite Database" <[email protected]> Date: Thursday, May 20, 2010, 5:13 AM You can write your own VFS and then use it to open your encrypted database file. On open VFS will read file into memory and decrypt it. Then on each SQLite's request to read the file VFS will copy necessary part from the unencrypted location to the buffer provided by SQLite... It should work exactly as you want except some memory copying on each attempt to read... Pavel On Wed, May 19, 2010 at 5:17 PM, Max Cat <[email protected]> wrote: > Hi all, > > Is there any way to load a sqlite3 db from a location in memory? Ideally, I'd > like to have a memory pointer (eg, something provided via malloc), which I > could then use as the handle sqlite3 uses to load the database. > > The reason I'm trying to do this: I have an encrypted database file that I > will copy into memory, decrypt, and then process. I would like to do this > entirely in memory (no unencrypted files on the HD) to reduce the likelihood > of casual users snooping in the db file. > > If that makes no sense, let me know, and I'll try to clarify. > > Thanks in advance for your help! :) > > -Max > > > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

