orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Feature Request - Add modifiers support for MATCHES in Sql request

Open PiotrChr opened this issue 12 years ago • 3 comments

The Features Request:

It would be really helpful if MATCHES in SQL query could support modifiers. I'm working currently on orient-db based service and I'm really exited about its speed. I was even more amused by speed of regexp filter, untill I found out there's no support for modifiers, and particularly 'case insensitive' flag. I'm aware that this kind of filtering can be done in (at least) two ways - parsing input string to return each alphabetical char as a collection of uppercase and lowercase (i.e. ^[Ff][oO][oO].*), or creating a custom JS function. Although each way is not that problematic, using a modifiers would be much less time consuming.

PiotrChr avatar Jun 13 '14 13:06 PiotrChr

The case-insensitive modifier is already supported (at least in 1.7.9) using the "Java-style" regex syntax; for your example: select from SomeObject where name matches '(?i)foo.*' I haven't tested any others yet.

buzzkillington avatar Dec 17 '14 14:12 buzzkillington

Ok, so we already have this, right?

lvca avatar Jan 31 '15 18:01 lvca

@lvca - I don't know if this was the intended implementation, or a coincidence/side-effect. If the team has:

  • evaluated the implementation,
  • determined that this is the preferred syntax, and
  • (if it was an "accidental" feature) ensured that it's considered a documented part of the API moving forward

then the status/labeling for this issue makes sense.

buzzkillington avatar Feb 04 '15 19:02 buzzkillington