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

Tobias Müller wrote:
>> For an even smaller footprint change, you can write your own
>> xFileControl routine and then use sqlite3_file_control to
>> query/set values.
> 
> By "write your own xFileControl routine" did you mean that we should
> change the SQLite source to support our query?

Sending a file control is just standard SQLite 3 api
http://sqlite.org/c3ref/file_control.html

To receive the file control, you have to implement the xFileControl
method in your VFS file http://sqlite.org/c3ref/io_methods.html

For example you could have an opcode that returns the current file size
and then keep calling sqlite3_file_control when you want to find that
out.  This would essentially be a reactive way of solving the problem.
Using xWrite variants that i/o error would be proactive.

You could also combine the approaches using a file control to get the
current size (so you can have nice user interface) and another to set
the maximum size which xWrite would take note of.

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

iEYEARECAAYFAkkCQzAACgkQmOOfHg372QQI2gCgjg7iaeotdCjYlEZeQMDU1aqd
9C4AnR9MGs3N02P5P3RhRK95y1FsUSnU
=uBPu
-----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