Re: [sqlite] SQLite working with C++'s iostream

2010-10-04 Thread Richard Hipp
On Mon, Oct 4, 2010 at 1:53 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/03/2010 10:01 PM, Max Vlasov wrote: > > On Sun, Oct 3, 2010 at 7:21 PM, Roger Binns > wrote: > > > >> > >> Also note that xTruncate may be called to make a file longer. > >> > >> > > Ro

Re: [sqlite] SQLite working with C++'s iostream

2010-10-04 Thread Jay A. Kreibich
On Sun, Oct 03, 2010 at 06:31:41PM +0200, Pierre Krieger scratched on the wall: > But the main reason why I would use streams is for other things like > reading data from a socket or decrypting a file on-the-fly for example > (these are just ideas) SQLite has some very specific requirements for

Re: [sqlite] SQLite working with C++'s iostream

2010-10-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/2010 10:01 PM, Max Vlasov wrote: > On Sun, Oct 3, 2010 at 7:21 PM, Roger Binns wrote: > >> >> Also note that xTruncate may be called to make a file longer. >> >> > Roger, are you sure about that? That has certainly been stated in the past.

Re: [sqlite] SQLite working with C++'s iostream

2010-10-04 Thread Max Vlasov
On Sun, Oct 3, 2010 at 7:21 PM, Roger Binns wrote: > > Also note that xTruncate may be called to make a file longer. > > Roger, are you sure about that? My own experience with VFS showed that expanding was always handled by xWrite pointing to the offset outside the current container size and afte

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/2010 10:03 AM, Pierre Krieger wrote: > For example a stream which handles a simple ROT-13 "encryption" can > be written in ten minutes (if you know the internals of the iostream library) My Python wrapper has this functionality as an example

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/2010 09:31 AM, Pierre Krieger wrote: > Anyway I don't think about using this code in a real program for the > moment, I just made it because of my love for modularity and because it > looked like a nice idea It is a good idea and the use case

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Pierre Krieger
> That's going to be problematic, because almost all of SQLite's usage > of underlying I/O is block-style, not stream-style, more akin to > accessing elements in a persistent byte array (with other practical > matters added on, of course) than to reading and writing streams. > You'd probably be bet

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Drake Wilson
Quoth Pierre Krieger , on 2010-10-03 18:31:41 +0200: > But the main reason why I would use streams is for other things like > reading data from a socket or decrypting a file on-the-fly for example > (these are just ideas) That's going to be problematic, because almost all of SQLite's usage of und

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Pierre Krieger
Thanks for answering > You claim that documentation is missing.  Specifically what was not > documented? Well I was referring to the online documentation (sqlite.org/c3ref/vfs.html and sqlite.org/c3ref/io_methods.html) which don't explain the effects, possible return codes, etc. of some of the f

Re: [sqlite] SQLite working with C++'s iostream

2010-10-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/03/2010 12:25 AM, Pierre KRIEGER wrote: > I made my own implementation You claim that documentation is missing. Specifically what was not documented? BTW for SQLITE_GET_LOCKPROXYFILE just Google "sqlite SQLITE_GET_LOCKPROXYFILE". You should