Hi, Ryan,
Sorry, I made a mistake in my condition parser. Please replace line 329
(simple <- ...) with
simple <- %s* (%func <field> <op> '?')
-> apply %s* / %s* <field> <op> %s*
and things should work again. :-) I am commiting this change to github.
--
Fabio Mascarenhas
On Tue, Feb 2, 2010 at 8:38 PM, Ryan Pusztai <[email protected]> wrote:
> Hi Fabio,
>
>
> On Tue, Jan 26, 2010 at 11:28 AM, Ryan Pusztai <[email protected]> wrote:
>
>> Hi Fabio,
>>
>> On Mon, Jan 25, 2010 at 5:56 PM, Fabio Mascarenhas
>> <[email protected]>wrote:
>>
>>> Yes, lpeg is a rock that you install with "luarocks install lpeg".
>>>
>>> Could you apply the attached patch to orbit/model.lua to try the new
>>> LPEG-based matcher and write back? Thanks!
>>>
>>>
>> This works great! I tested it on all my different sets of queries and it
>> works all the time. I did not have to install anything because LPeg was
>> already there. I used the Kepler installer to install Kepler and Xavante. It
>> must have come in with that. Is this going to be included in Orbit? Since
>> LPeg seems to already be a requirement.
>>
>> Again your support is very appreciated. Thanks so much.
>> --
>> Regards,
>> Ryan
>>
>
> OK I did more testing and I found another case that doesn't work.
>
> Here is the code:
>
> self:find_all("user_id IS NULL and oem = ?", {BMW, order = "id asc"})
>
>
> here is the generated SQL statement:
>
>
> select * from visiondb_clip where user_id IS NULL BMWand id=id order by
> id asc
>
>
> Error message:
>
> /usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160: LuaSQL: error
> executing query. MySQL: You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right syntax to
> use near 'BMWand id=id order by id asc' at line 1
> stack traceback:
> [C]: in function 'error'
> /usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160: in function
> (tail call): ?
> (tail call): ?
> ./search_controller.lua:44: in function <./search_controller.lua:28>
> (tail call): ?/usr/local/rocks//orbit/2.0.2-1/lua/orbit/model.lua:160:
> LuaSQL: error executing query. MySQL: You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the right
> syntax to use near 'BMWand id=id order by id asc' at line 1
> stack traceback:
> /usr/local/rocks//coxpcall/1.13.0-1/lua/coxpcall.lua:24: in function
> (tail call): ?
> (tail call): ?
> /usr/local/rocks//orbit/2.0.2-1/lua/orbit.lua:497: in function
> (tail call): ?
> (tail call): ?
>
> --
> Regards,
> Ryan
>
> _______________________________________________
> Kepler-Project mailing list
> [email protected]
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
> http://www.keplerproject.org/
>
_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/