Vivien wrote:
Rebuilding of SQL statemetns seems to fail where there are multpile WHERE clauses. I havn't found the problem yet. I'm off on holiday tommorow for a while but i will see if i can fix problem first. If you parse this sql statement i think it gets the correct values when it pulls it apart, but fails to rebuild the sql statement afterwards in its correct form.I'm working at the moment to provide function calling support for libsql. I'm also putting in a few support functions to better help manupliate sql. Ie being able to easily append where and join causes into a sql statement.I've just commited a small correction for functions other than SELECT where the target table was confused with a function and the fields were the arguments of the function (for example in "INSERT INTO foo (name)" foo (name) was interpreted as a function). Cheers, Vivien
select * from sale where invoice is null and companyid=5 and gendate < 5parsing: select * from sale where invoice is null and companyid=5 and gendate < 5
Invalid condition type: 6rebuilt: select * from sale where (((invoice is null) and (companyid = 5)) and ()) query: select * from sale where invoice is null and companyid=5 and gendate < 5
fields:
*
from:
table: sale
where:
pair: 0
left:
pair: 0
left:
op: IS
left:
invoice
right:
null
right:
op: =
left:
companyid
right:
5
right:
op: <
left:
gendate
right:
5
Tables: sale
Fields: *