Issue 21482 - [parser] MySQL driver should recognise "regexp" keyword
Summary: [parser] MySQL driver should recognise "regexp" keyword
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC5
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
Depends on:
Blocks:
 
Reported: 2003-10-21 03:02 UTC by ingenstans
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2003-10-21 03:02:53 UTC
MySQL has a very useful "regexp" keyword, which lets you write things like 
'SELECT headline FROM articles WHERE bodytext REGEXP "weapons .* destruction" '

However, queries of this sort are not currently allowed by the OOo MySQL driver, 
and can't be used in forms (they can be typed in as raw SQL).

The enhancement I propose is to allow the driver to accept these queries. 
Ideally, they should be parameterisable too. so that we could write and store 
queries like "SELECT headline FROM articles WHERE Bodytext regexp :x"
Comment 1 Frank Schönheit 2003-10-21 08:52:47 UTC
Due to your last paragraph, I assume that using REGEXP together with
parameters is the real intention here :). One way would be what you
suggested - enhance the parser, so that it recognizes this keyword.
However, enhancing the parser with keywords which are too
database-specific should be done very carefully only.
The other possible solution would be to allow parameters for "native"
queries, too. At the moment, the parameter information is obtained by
our SQL parser, so if a statement is not parseable, there are no
parameters. We could alternatively allow the user to declare a number
of parameters even for native statements where we cannot find the
parameters ourself ...
Comment 2 Frank Schönheit 2003-10-23 08:42:30 UTC
fs->oj: if somebody is every to implement this, then most probably you :)
Comment 3 hans_werner67 2004-02-02 12:17:59 UTC
change subcomponent to 'none'