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
(attachments)
update_expressions.patch (7.99 KB)