Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Handling Oracle's missing ILIKE operator #105

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Handling Oracle's missing ILIKE operator #105

wants to merge 4 commits into from

Conversation

cope
Copy link

@cope cope commented Oct 19, 2017

Oracle does not have the ILIKE operator, which makes the pure usage of wlNext.caseSensitive flag not possible.

Here's what I found out and what my change is based on. Setting wlNext.caseSensitive: true produces a plain LIKE query, which makes perfect sense.

Setting wlNext.caseSensitive: false produces an ILIKE query. This case throws an error when using with Oracle, because Oracle does not have the ILIKE operator.

My solution above was twofold. First, I fixed the DRY violation on the wlNext.caseSensitive flag checking. Second, I added a new flag wlNext.forceLike with which one can indicate that the database requires LIKE to be used, instead of ILIKE.

Oracle does not have the ILIKE operator, which makes the pure usage of `wlNext.caseSensitive` flag not possible.

Here's what I found out and what my change is based on. Setting `wlNext.caseSensitive: true` produces a plain LIKE query, which makes perfect sense.

Setting `wlNext.caseSensitive: false` produces an ILIKE query with the LOWER wrap, which is a bit confusing to me, because the ILIKE is case-insensitive, and therefore there should be no need for LOWER. Never the less, this case throws an error when using with Oracle, because Oracle does not have the ILIKE operator.

My solution above was twofold. First, I fixed the DRY violation on the `wlNext.caseSensitive` flag checking. Second, I added a new flag `wlNext.forceLike` with which one can indicate that the database requires LIKE to be used, instead of ILIKE.
cope added 3 commits November 6, 2017 13:37
Fixing the missing )
fixing accidental new line :(
I need coffee...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant