On Thu, Jun 18, 2009 at 10:38 PM, James
Henstridge<email address hidden> wrote:
> I think it might be useful to add startswith(), endswith() and
> containsstring() methods to Comparable, implemented with LIKE similar to
> CONTAINSSTRING(). That would allow more natural usage (e.g.
> store.find(Table, Table.column.startswith("foo"))).
>
> If Comparable.__contains__() could work for "substring in column" type
> expressions, then that might be even better (although wouldn't allow for
> a case_sensitive optional argument).
store.find(Table, Table.column.lower.startswith(somestring.lower()))
would be the case insensitive version, wouldn't it?
On Thu, Jun 18, 2009 at 10:38 PM, James startswith( "foo")) ). __contains_ _() could work for "substring in column" type
Henstridge<email address hidden> wrote:
> I think it might be useful to add startswith(), endswith() and
> containsstring() methods to Comparable, implemented with LIKE similar to
> CONTAINSSTRING(). That would allow more natural usage (e.g.
> store.find(Table, Table.column.
>
> If Comparable.
> expressions, then that might be even better (although wouldn't allow for
> a case_sensitive optional argument).
store.find(Table, Table.column. lower.startswit h(somestring. lower() ))
would be the case insensitive version, wouldn't it?
-- www.stuartbisho p.net/
Stuart Bishop <email address hidden>
http://