Hi Roger,

For experimentation, I definitely agree that using a higher level 
language is better. What I am after is an authoritative source for exact 
behavior of the various functions, what different errors they may return 
and what the ramifications of not implementing various methods are, etc 
etc. There is some information of that nature in the reference, but it 
would be ideal if the article on the sqLite website itself would be 
completed as that would eliminate some guesswork. The rest of the sqLite 
documentation, and indeed the beginning of the VFS article, is 
excellent. It allows me to implement things immediately without having 
to search third party sources and hack around to find what works and 
what doesn't. It would be ideal if the same could be true for the VFS layer.

Kind regards,

Philip Bennefall
On 5/24/2015 10:38 PM, Roger Binns wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/24/2015 02:39 AM, Philip Bennefall wrote:
>> I have looked at the example VFS implementations, but it is hard
>> to determine which parts of the code that are implementation
>> details as opposed to being part of the stable public API so to
>> speak.
> The answer is that it matters what you are exposing.  A vfs for a csv
> file is a very different beast that one exposing bits of Amazon's
> services.  I wrote one that exposes couchdb, but it wouldn't help
> someone else exposing something different.
>
> What I recommend you do is use one of the higher level languages that
> exposes the VFS in their SQLite bindings.  You will get better error
> messages, be able to write the code quicker, and explore behaviour
> easier (eg xBestIndex).  ie you'll get a better on the VFS specific
> issues, rather than having to build out C level plumbing.  Once you
> have that understood, converting to C is simpler than having started
> with C.
>
> For example my Python wrapper (APSW) exposes the VFS, along with an
> example and documentation.  It also easily lets you "inherit" from an
> existing VFS so you only have to write methods where you want
> different behaviour (eg mangling file names, or modifying how the
> database file contents are stored).
>
>    http://rogerbinns.github.io/apsw/vfs.html
>
> You should find similar bindings in your higher level languages of choice.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iEUEARECAAYFAlViNrAACgkQmOOfHg372QRrrQCYxRX6XbpyS39O5V+tJyyjXjx6
> vACgxZ/Uu+TDvT22u1FN083YFMu2muc=
> =wo2G
> -----END PGP SIGNATURE-----
> .
>

Reply via email to