Re: [sqlite] A memvfs for loading/saving database from buffer

2009-08-02 Thread stephen liu
http://sphivedb.googlecode.com/files/spmemvfs-0.2.src.tar.gz The demo code: typedef struct spmembuffer_t { char * data; int used; int total; } spmembuffer_t; typedef struct spmemvfs_db_t { sqlite3 * handle; spmembuffer_t * mem; } spmemvfs_db_t; void test( spmemvfs_db_t * db

[sqlite] SPHiveDB: A server for sqlite database.

2009-06-14 Thread stephen liu
http://code.google.com/p/sphivedb/ SPHiveDB is a server for sqlite database. It use JSON-RPC over HTTP to expose a network interface to use SQLite database. It supports combining multiple SQLite databases into one file. It also supports the use of multiple files ( through Tokyo Cabinet ). It is

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-05-01 Thread stephen liu
> It also sounds like you are operating in an environment that is almost > entirely reading and with lots of memory. You could still store one Yes. The memvfs requires to entirely reading the database. So this solution is just for something like addressbook application, the data for one user is

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-05-01 Thread stephen liu
http://spserver.googlecode.com/files/spmemvfs-0.1.src.tar.gz Changes: * Modify the save callback, transfer the ownership of the buffer to callback function * Add a buffer map to pass buffer between application and sqlite3 vfs The demo code: static void * load( void * arg, const char * path, int

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-04-29 Thread stephen liu
> > > > I want to save sqlite database as a entry of the dbm. > > If you really have to store the sqlite databases as blobs, why not store > them in yet another sqlite database as a blob instead of inside dbm? > SQLite has the drawback of not letting you resize a blob (you have to > create a new

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-04-28 Thread stephen liu
I try to implement One SQLite Database Per User. http://stackoverflow.com/questions/128919/extreme-sharding-one-sqlite-database-per-user Extreme Sharding: One SQLite Database Per User 2009/4/29 stephen liu <stephen@gmail.com> > > I want to save multipile sqlite database

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-04-28 Thread stephen liu
<rog...@rogerbinns.com> > stephen liu wrote: > > The attachment is a memvfs implementation for sqlite. > > The mailing list strips out attachments. > > > With the memvfs, we can loading/saving sqlite database from buffer. > > Even simpler, you can use sq

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-04-28 Thread stephen liu
The mailing list strips out attachments. Please download from: http://spserver.googlecode.com/files/spmemvfs.tar.gz 2009/4/29 Virgilio Alexandre Fornazin > Where we can get the code ? > >

[sqlite] A memvfs for loading/saving database from buffer

2009-04-28 Thread stephen liu
Hi, The attachment is a memvfs implementation for sqlite. With the memvfs, we can loading/saving sqlite database from buffer. There also includes a demo to show how to use it. Cheers, Stephen Liu ___ sqlite-users mailing list sqlite-users@sqlite.org