Subhadeep Ghosh wrote: > I finally managed to create a wrapper around the SQLite core to support > the creation of in-memory databases. The wrapper comprises of three > functions - one to serialize the database, one to de-serialize a database > and the third one to do the cleanup job. > > The function which serializes a database, copies the entire contents of > the database to a block of memory. The function which de-serializes takes > a block of memory as input and creates a database object out of it. > > I am including the source code for the interested souls and I've not put > comments as I hate doing it. > > I hope you guys find the code useful or at-least interesting.
I hope you didn't spend too much time on that. SQLite supports in-memory databases natively: if you open the file called ":memory:" you get an in-memory database that dies when the connection is closed: http://sqlite.org/c3ref/open.html -- Eric A. Smith More people would come here if it weren't so crowded. -- Yogi Berra _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users