Opened 17 years ago
Last modified 17 years ago
#1022 closed enhancement
Add support for using regular expressions in queries — at Initial Version
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.8 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
This is not in the SQL standard, but both Postgres and MySQL have an implementation. The syntax is of course different, but we have already other cases where this is the case (for example, taking the logarithm). The only worry is that using regular expressions on large tables (eg. the reporters table) may not be good for performance.
- MySQL: http://dev.mysql.com/doc/refman/5.0/en/regexp.html
- Postgres: http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#FUNCTIONS-POSIX-REGEXP
Implementation wise this should not be very difficult. We need to add methods to the DbEngine interface. The DefaultDb enginge needs to be extended with a method and the AbstractDbEngine should provide a default implementation. I think the default implementation should use equality testing in case of any better option.