Your tree is wrong. I would expect that operator precedence is handled in the 
parser. The code generator will happily implement any tree, regardless of how 
insane it may be.

-----Ursprüngliche Nachricht-----
Von: Prakash Premkumar [mailto:prakash.p...@gmail.com]
Gesendet: Montag, 10. November 2014 10:40
An: General Discussion of SQLite Database
Betreff: [sqlite] SQLite where clause tree

The where clause in sqlite is encoded as a tree

Let's say I have select statement like :

SELECT * from employee where salary = 3+5*4+3;

The tree which takes care of operator precedence is :

                           =
                         /    \
              salary        +
                             /   \
                           3     3
                          /
                         *
                      /    \
                     5     4

If I am constructing this tree for where clause by myself, should i take the 
operator precedence in to account while constructing it or will sqlite take 
care of precedence,given any tree (i.e constructing it with out taking 
precedence into account) ?

Kindly give me some pointers towards this tree construction Thanks a lot for 
your time.

Regards
Prakash
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to