Opened 15 years ago
Closed 15 years ago
#1022 closed enhancement (fixed)
Add support for using regular expressions in queries
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.8 |
Component: | core | Version: | |
Keywords: | Cc: |
Description (last modified by )
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.
Note! This ticket is about support in the core only. See #1023 for support in the web interface.
Change History (4)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
Milestone: | → BASE 2.x+ |
---|
comment:3 Changed 15 years ago by
Milestone: | BASE 2.x+ → BASE 2.8 |
---|---|
Owner: | changed from everyone to Nicklas Nordborg |
Status: | new → assigned |
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [4317]) Fixes #1022: Add support for using regular expressions in queries