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

On 07/28/2010 07:37 AM, Ben Harper wrote:
> then it would be great if the xUpdate function could inform one that only the 
> field 'age' is being altered. As it is now, every field is fed to xUpdate, 
> causing a circumventable read/verify/write burden on the VT implementation.
> 
> This must be a frequent question?

It isn't a frequent question and the current semantics do make sense in
various situations.  For example one VT I wrote deals with CouchDB where all
writes going back to it must be complete (you can't update just one field).
 SQLite itself packs the fields together as it does need all of their values
in order update a row.

It is also possible for more than one field to modified at a time with an
update, not to mention being set to the value they already have:

  UPDATE people SET age=age, name=name WHERE 1

You are however right that there are times when you only want to know what
changed, not the complete row.  This could only be done by updating the VT
api which means lots of new code, having to support the current xUpdate as
well as the new one so that existing VT implementations continue to work,
testing of all possible code paths etc.

Or you could just live with it :-)  For my code I keep a cache of the most
recently requested rows as there was an extra id I needed that isn't
presented to SQLite, so when the xUpdate comes I don't need the read/verify
burden.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxQWuUACgkQmOOfHg372QTNLQCgycZ5O67MVmQbkcT5Y9UzquO/
Lg8An2Pj8O3a3DxfvCPm3+7T284tzzzv
=J9p8
-----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