On May 10, 5:13 am, Nicholas Dudfield <[email protected]> wrote: > Greetings, > > I have been using SQLA for a few months. > > For admin CRUD index pages I have been using a naive search_keywords > function as > seen at end of message. > > Instead of using a primitive shlex.split, which incidentally is not unicode > friendly, and one crude search_type (AND|OR) I'd like to use something > that will > lex/parse a search string and build the queries. > > eg. > ((x or z or y) and q) or not "h m" > > I imagine this would be a fairly common requirement however I can't seem > to find > any implementation anywhere. > > I used google code search with the query "pyparsing sqlalchemy lang:python" > however found no useful results. >
Google for "pyparsing query parser" and you'll find some helpful links: http://pyparsing.wikispaces.com/file/view/searchparser.py http://rephrase.net/days/07/04/pyparsing The O'Reilly shortcut "Getting Started with Pyparsing" ends with the development of a search query parser to search for recipes by querying for matching ingredients. -- Paul (author of "Getting Started with Pyparsing") --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
