Merge lp:~jamesh/storm/bug-387840 into lp:storm
Proposed by
James Henstridge
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~jamesh/storm/bug-387840 | ||||
Merge into: | lp:storm | ||||
Diff against target: |
139 lines 4 files modified
NEWS (+4/-0) storm/expr.py (+27/-0) tests/databases/base.py (+27/-0) tests/expr.py (+31/-0) |
||||
To merge this branch: | bzr merge lp:~jamesh/storm/bug-387840 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John O'Brien (community) | Approve | ||
Jamu Kakar (community) | Approve | ||
Review via email: mp+13769@code.launchpad.net |
To post a comment you must log in.
Add some string manipulation methods to Comparable implemented in terms of the LIKE operator: startswith( ) __contains_ _()
* startswith(): same semantics as unicode.
* endswith(): same semantics as unicode.endswith()
* containsstring(): same semantics as unicode.
Each method performs escaping of SQL regexp special characters.
I didn't know whether adding a string-specific __contains__() method to Comparable would be appropriate, which is why the last method has the name containsstring(). I'd be happy to change that if anyone has a suggestion (either a new name, or __contains__ if that is appropriate).