CONTAINSSTRING should move to storm.expr
Bug #387840 reported by
Stuart Bishop
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Wishlist
|
James Henstridge |
Bug Description
storm.sqlobject
I'd like to propose that the storm.sqlobject
storm.sqlobject
The new expression should be exposed in storm.locals.
This could be a new class, perhaps named Contains, or storm.expr.In could be overloaded to handle the case where both arguments are strings.
Related branches
lp:~jamesh/storm/bug-387840
- John O'Brien (community): Approve
- Jamu Kakar (community): Approve
-
Diff: 139 lines4 files modifiedNEWS (+4/-0)
storm/expr.py (+27/-0)
tests/databases/base.py (+27/-0)
tests/expr.py (+31/-0)
Changed in storm: | |
importance: | Undecided → Wishlist |
Changed in storm: | |
assignee: | nobody → James Henstridge (jamesh) |
milestone: | none → 0.16 |
status: | New → In Progress |
Changed in storm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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).