add postgres's regex operator for more powerful searching?
This small patch adds the very powerful postgres regex operator to OpenObject searches:
___
openerp-
-OPS = ('=', '!=', '<>', '<=', '<', '>', '>=', '=?', '=like', '=ilike', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of')
+OPS = ('=', '!=', '<>', '<=', '<', '>', '>=', '=?', '=like', '=ilike', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of', '~', '~*')
___
Adding the '~' and '~'" operators will give OpenERP access to Postgres's excellent regular expression engine for searches; much more power than 'like'. This tiny patch works for great for me, would love to see it in the trunk.
___
Optionally?
But that may require many more lines are touched; especially all the occurrences of
which by the way, would be more maintainable as one preamble copy of
not_operators=['not like','not ilike','not in','<>','!=','not ~','not ~*']
used by all the lines like this
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Scott Meyer for more information if necessary.