LIKE missing in gadfly

Skip Montanaro skip at pobox.com
Wed Oct 10 11:27:53 EDT 2001


    Christophe> In the gadfly doc, the LIKE command is ommitted due to the
    Christophe> ``re'' module in python. All right, how could I implement
    Christophe> this on the server side to avoid too many data to transit.

Why not just add LIKE support to Gadfly?  LIKE uses a very simple wildcard
scheme (at least in MySQL, where I use it).  "%" is the same as ".*" in
regular expressions and "_" is the same as ".", so in the Gadfly code you
could (in theory) implement LIKE as a case-insensitive regular expression.
"%Dav_\%" would map to the regular expression "(?i).*Dav.%".

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list