On Mon, Jan 25, 2010 at 5:22 PM, Ryan Pusztai <rpusz...@gmail.com> wrote:
> Hi Fabio, > > On Mon, Jan 25, 2010 at 4:56 PM, Fabio Mascarenhas <mascaren...@acm.org>wrote: > >> Lua's pattern matcher is too poor to make both cases work with a >> single pattern... you can make the second case work with >> >> self:find_all_by_vehicle_type_and_oem{ "BMW 5 Series", "BMW" } >> >> A more general solution needs to retrofit orbit.model to use LPEG >> instead of string.gsub... it is not hard, but does introduce another >> dependency. >> >> > Hum... Is there a LPeg rock? If so, is this an optional add-on that could > be made. My applications main goal is to search a database by defining > search criteria, so it is going to be very important for users to do both. > Any alternatives/thoughts? > > I generate these queries from user input so I am not sure how to make the > 'self:find_all_by_vehicle_type_and_oem()' to be programmaticly generated? I > hope that is not a stupid question, but that is an option if I can figure > out how to do it. > > Thanks. > Well I thought about this further and even if I could generate the "active recod" type of finds. I would not be able to do the REGEXP and NOT REGEXP and !=, would I? -- Regards, Ryan
_______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/