[GRASS5] DBF update with expressions

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Sat Jul 16 21:54:51 EDT 2005


Hi all.

The attached patch implements sql update commands that use expressions, giving
you a more sql-ish dbf driver. It is a first draft so please bear with me and
give it a little testing.

Motivation: have a more useful v.db.update.

Technical note: I had to change the lexer, since '1+2' was being erroneously
tokenized as two integers '1' and '+2'. To see that, with current CVS try to
'select * from blah where 2=1+1;'. I redefined INTNUM to be unsigned and added
parser rules to handle eventual '-' signs. I'm not sure if it is fully
backward compatible. Also, given the ability to handle expressions, I think
the grammar and the interpreter could be simplified by eliminating special
casing for updates and maybe extended to handle more sql-ish typeless expressions.

Please tell me what can be improved.

-- Daniel Calvelo Aros

-------------- next part --------------
A non-text attachment was scrubbed...
Name: update_expressions.patch
Type: application/octet-stream
Size: 8185 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20050716/75ce4e7a/update_expressions.obj


More information about the grass-dev mailing list