-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

D. Richard Hipp wrote:
> suggest API or functionality changes, now would be a good to to do so,

I have a few in no particular order, based on currently implementing vfs
in my Python SQLite wrapper.

I would like a #define of the current version number.  This allows me to
cause compile time failure if it is different than my code expects.
(Under the hood I allow "inheritance" from existing vfs so I runtime
detect if the versions mismatch but would prefer to catch it earlier.)

There is no way to pass back error text, only error codes.  Some method
for also setting error text would be nice and more user friendly.

Although you encourage never deleting a vfs, but rather replacing with
one of the same name, I would like some safety checks since from a
dynamic language environment that can only be achieved by leaking
memory.  For example I currently add something to my normal
sqlite3_open_v2 wrapper to catch which vfs is used and if it is one of
mine then increment reference counts.  That way I can know for sure if a
vfs is in use and not call unregister.  There is still a theoretical
race condition between unregistering at the same time as someone tries
to use it, but that won't happen in Python due to the global interpreter
lock.

I'd like the xFileControl method to also take a parameter saying how big
the pArg is.  That makes it possible to use from a non-C environment,
and would add extra safety in a C environment.  (For example in a
wrapper I can't return anything since I have no idea how big the area is.)

I'd like a "not implemented" error code.  You could then fallback to the
default vfs if necessary.  For example a NULL for xDlOpen is treated as
not implemented, but if I supply a callback into Python, that code can't
respond based on runtime determination that it isn't implemented.

I'd also prefer the documentation to be in the wiki so people who use it
can update it as they discover various issues.  The doc is currently
duplicated in http://www.sqlite.org/34to35.html and
http://www.sqlite.org/c3ref/vfs.html

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIG+ptmOOfHg372QQRAgSXAKDQVphZCHfWe1smV/+OjgbTQD8rNQCeK8Ya
7HDM/jDhgEPexr803lJi+AM=
=lZqJ
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to