Replace the whole sql_condition pattern with this: -------- local sql_condition = re.compile([[ top <- {~ <condition>* ~} condition <- %s* '(' %s* <condition> %s* ')' %s* / <simple> (<conective> <condition>)* simple <- %s* (%func <field> <op> '?') -> apply %s* / %s* <field> <op> <field> %s* / %s* <field> <op> %s* field <- {[%w_]+('.'[%w_]+)*} op <- { %s* [!<>=~]+ %s* / (%s+ !<conective> %w+)+ %s*} conective <- [aA][nN][dD] / [oO][rR] ]], { func = lpeg.Carg(1) , apply = function (f, field, op) return f(field, op) end }) --------
I am overhauling orbit.model so it will be able to express more complex queries (joins, subqueries) and separate the logical and the physical schemas (names of entities vs. table names, names of fields in the result vs fields in the database). Stay tuned. :-) -- Fabio Mascarenhas On Wed, Feb 3, 2010 at 10:58 PM, Ryan Pusztai <rpusz...@gmail.com> wrote: > I don't use the git version, so can you post the fix? > > Thanks. > -- > Regards, > Ryan > > On Feb 3, 2010 3:34 PM, "Fabio Mascarenhas" <mascaren...@acm.org> wrote: > > On Wed, Feb 3, 2010 at 3:26 PM, Ryan Pusztai <rpusz...@gmail.com> wrote: > > > Hi Fabio, > > On Tue, F... > Yep. :-) > > >> >> simple <- %s* (%func <field> > <op> '?') -> apply %s* /... > I noticed this bug today, while writing some queries. :-) I have just > pushed a fix. > > -- > Fabio Mascarenhas > > > _______________________________________________ > Kepler-Project mailing list > Kepler-Project@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ > > > _______________________________________________ > Kepler-Project mailing list > Kepler-Project@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ >
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/