Skip to content

Commit a815f5f

Browse files
Assorted Fixes #8 (#1807)
* Fixes #1684: Support CREATE MATERIALIZED VIEW with AUTO REFRESH Support parsing create view statements in Redshift with AUTO REFRESH option. * Reduce cyclomatic complexity in CreateView.toString Extract adding the force option into a dedicated method resulting in the cyclomatic complexity reduction of the CreateView.toString method. * Enhanced Keywords Add Keywords and document, which keywords are allowed for what purpose * Fix incorrect tests * Define Reserved Keywords explicitly Derive All Keywords from Grammar directly Generate production for Object Names (semi-) automatically Add parametrized Keyword Tests * Fix test resources * Adjust Gradle to JUnit 5 Parallel Test execution Gradle Caching Explicitly request for latest JavaCC 7.0.10 * Do not mark SpeedTest for concurrent execution * Remove unused imports * Adjust Gradle to JUnit 5 Parallel Test execution Gradle Caching Explicitly request for latest JavaCC 7.0.10 * Do not mark SpeedTest for concurrent execution * Remove unused imports * Sphinx Documentation Update the MANTICORE Sphinx Theme, but ignore it in GIT Add the content to the Sphinx sites Add a Gradle function to derive Stable and Snapshot version from GIT Tags Add a Gradle GIT change task Add a Gradle sphinx task Add a special Test case for illustrating the use of JSQLParser * doc: request for `Conventional Commit` messages * feat: make important Classes Serializable Implement Serializable for persisting via ObjectOutputStream * chore: Make Serializable * doc: Better integration of the RR diagrams - apply neutral Sphinx theme - insert the RR diagrams into the sphinx sources - better documentation on Gradle dependencies - link GitHub repository * Merge * feat: Oracle Alternative Quoting - add support for Oracle Alternative Quoting e.g. `q'(...)'` - fixes #1718 - add a Logo and FavIcon to the Website - document recent changes on Quoting/Escaping - add an example on building SQL from Java - rework the README.md, promote the Website - add Spotless Formatter, using Google Java Style (with Tab=4 Spaces) * style: Appease PMD/Codacy * doc: fix the issue template - fix the issue template - fix the -SNAPSHOT version number * Update issue templates * Update issue templates * feat: Support more Statement Separators - `GO` - Slash `/` - Two empty lines * feat: FETCH uses EXPRESSION - `FETCH` uses `EXPRESSION` instead of SimpleJDBCParameter only - Visit/Accept `FETCH` `EXPRESSION` instead of `append` to String - Visit/Accept `OFFSET` `EXPRESSION` instead of `append` to String - Gradle: remove obsolete/incompatible `jvmArgs` from Test() * style: apply Spotless * test: commit missing test * feat: Lateral View Implement Lateral View according to https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-lateral-view.html#syntax Add proper tests Fixes #1777 Fixes #239 Fixes #1723 * feat: Oracle `HAVING` before `GROUP BY` Basic support for Oracle's `HAVING` before `GROUP BY` option. It will be parsed without any special consideration for the order. Special Oracle Test groupby07.sql gets parsed, but fails when the deparser reorders the clauses. Fixes #1774 * feat: Multi-Part Names for Variables and Parameters Fixes #1771 Fixes #1768 * feat: ClickHouse `Select...` ``FINAL` modifier Fixes #1774 BREAKING-CHANGE: introduces reserved keyword `FINAL` * feat: Test if a JOIN is an INNER JOIN according to the SQL:2016 An `INNER JOIN` is a qualified `JOIN` with the `INNER` qualifier or without any `LEFT` or `RIGHT` qualifier. Fixes #1775 * feat: Switch off contradicting `JOIN` qualifiers, when setting a qualifier * feat: implement SQL:2016 Convert() and Trim() - Fixes #868 - Fixes #1767 - Fixes Special Oracle Test `function03.sql` * feat: ClickHouse `LIMIT ... BY ...` clause - LimitDeparser accepts ExpressionVisitor - `SELECT` can have optional `LIMIT ... BY ...` clause - Fixes #1436 * test: add specific tests for closed issues * test: add specific tests for closed issues * refactor: remove `SelectExpressionItem` in favor of `SelectItem` BREAKING-CHANGE: `SelectExpressionItem` removed * doc: Update examples * build: Add missing import * doc: Update the README.md * fix: assign Enum case insensitive Fixes #1779 * fix: assign Enum case insensitive Remove redundant `DateTime` enum Fixes #1779 * Revert "fix: assign Enum case insensitive" This reverts commit 86d0ace. * feat: Consolidate the `ExpressionList`, removing many redundant List alike Classes and Productions - `ExpressionList` extends a `List<Expression>` directly and implements `Expression` - `ExpressionList` has no Brackets - introduce `ParenthesedExpressionList` which extends `ExpressionList` and has Brackets - refactor `MultiExpressionList` to extend `List<ExpressionList>` - replace any occurrence of `List<Expression>` with `ExpressionList` and remove lots of redundant Productions - `RowConstructor` extends `ExpressionList` - remove redundant `ValueExpressionList` (it was just an `ExpressionList` - get rid of any `useBrackets` flags - consolidate the `Cast` Functions - use `ExpressionListDeparser` as much as possible BREAKING-CHANGE: All `List<Expression>` and `List<Column>` related methods have changed. No `useBrackets` flags, instead use `ParenthesedExpressionList` when brackets are needed. * fix: Remove tests for `()`, since `ParenthesedExpressionList` will catch those too * refactor: UpdateSets for `Update` and `InsertConflictTarget` - remove redundant code - add license headers - register `function06.sql` success * build: Increase TimeOut for the GitHub CI * style: Appease Codacy * style: Checkstyle * refactor: Remove `ItemsList`, `MultiExpressionList`, `Replace` Since we have proper `ExpressionList` implementing `Expression` we can narrow down the API: - remove `ItemsList`, `ItemsListVisitor`, `ItemsListValidator` in favor of `ExpressionList` - remove `MultiExpressionList` in favor of `ExpressionList` - refactor `NamedExpressionList` so it extends `ExpressionList` and uses `ExpressionListDeparser` - simplify `InExpression` and `AnyComparisionExpression` BREAKING-CHANGE: many Classes and Methods removed * style: Appease Codacy * style: Rework all the ENUMs - assign Value only when really needed - implement `from()` method for getting the case-insensitive Enum * doc: Better Sphinx Tabs Addresses issue #1784 item 2 * doc: RR chart colors cater for Dark Mode Addresses issue #1784 item 3 * refactor: remove SimpleFunction Remove the production `SimpleFunction` Clean-up `InternalFunction` * build: improve Gradle Build - fix Version/Snapshot - add XML Doclet (for generating API Website via XSLT later) - fix the publishing task and add GitHub package * refactor: `Insert` uses `ExpressionList` and `UpdateSet` * test: Disable API Sanitation for the moment * style: Appease Checkstyle * style: Appease PMD * fix: find the correct position when field belongs to an internal class * style: replace all List<Expression> with ExpressionList<> and enforce policy via Acceptance Test - refactor `Merge`, use `ExpressionList`, `UpdateSet` and Visitor Pattern - refactor `Upsert`, use `ExpressionList`, `UpdateSet` and Visitor Pattern - refactor `Set` Statement - refactor `Limit`, `Pivot`, `Unpivot` ** Breaking Changes ** Getters/Setters of `Merge`, `Upsert`, `Set` have changed * refactor: generify `SelectItem` and remove `FunctionItem` and `ExpressionListItem` - generify `SelectItem<T extends Expression>` - replace `FunctionItem` with `SelectItem<Function>` - replace `ExpressionListItem` with `SelectItem<ExpressionList>` - appease PMD/Codacy ** Breaking Changes ** Getters/Setters of `Pivot`, `UnPivot`, `PivotXML` have changed * fix: Java Version 8 * feat: JdbcNamedParameter allows "&" (instead of ":") - fixes #1785 * feat: access Elements of Array Columns - Example `update utilisateur set listes[0] = 1` - fixes #1083 * feat: `MEMBER OF` condition as shown at https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#operator_member-of - fixes #1631 * style: appease PMD/Codacy * style: appease PMD/Codacy * test: add unit test for issue #1778 * feat: Write API documentation to the WebSite via XMLDoclet * Update sphinx.yml * build: Sphinx build fixes * build: Sphinx build fixes * build: Sphinx build fixes * build: improve the GIT Snapshot detection * fix: issue #1791 - Allow `START` keyword as table `CreateParameter` * fix: issue #1789 - allow `CREATE TABLE ...` column parameter with Postgres`nextval('public.actor_actor_id_seq'::regclass)` * fix: issue #1789 - allow `CREATE TABLE ...` column parameter with Postgres`nextval('public.actor_actor_id_seq'::regclass)` * refactor: simplify production `CreateParameter()` * refactor: SHOW statement, supporting any RDBMS specific implementation - returns any RDBMS specific implementation as `UnsupportedStatement` - fixes #1702 * refactor: RETURNING clause - supports Oracle's `RETURN ... INTO ...` - fixes #1780 - fixes #686 - Special Oracle tests `insert11.sql` and `insert12.sql` * refactor: CREATE and ALTER productions - avoid LOOKAHEADs - simplify the SimpleStatement() production - use UnsupportedStatements() for any RDBMS specific syntax - fixes #1515 - fixes #1453 * fix: Complex Parsing Approach - optionally provide a global Executor, instead spawning one for each parse - run into Complex Parsing only, when Complex Parsing was allowed - provide a Logger - fixes #1792 * style: Quieten the logger * style: Cosmetic improvements * feat: chaining JSON Expressions - supports chains like '{"obj":{"field": "value"}}'::JSON -> 'obj'::TEXT ->> 'field'::TEXT - fixes #1792 * style: remove unused imports * refact: Statements extends List<Statement> * build: try to work around the Maven/JDK8 issue on GitHub * feat: parse CREATE TRIGGER as UnsupportedStatement - fixes #1090 * feat: functions blocks, parenthesed JSON Expressions - fixes #1792, the very complex example - fixes #1477 * feat: functions blocks, parenthesed JSON Expressions - fixes #1792, the very complex example - fixes #1477 - cosmetics * Create gradle.yml * feat: Quoted Identifiers can contain double-quotes (PostgreSQL) - `SELECT "test""column""name"` - fixes #1335 * build: improve Upload task * doc: Website improvements - Show Release vs. SNAPSHOT - FURO theme - fix inline tab appearance * doc: Website, fix tabs * fix: throw the specific exception * doc: write migration guide * fix: expose IntervalExpression attributes and use DeParser * doc: migration guide * feat: T-SQL `FOR ...` clause - fixes #1800 * fix: SPHINX modules and themes * docs: write migration guide - migration guide - Getters for List Elements - Rename Join `rightItem` to `fromItem` * feat: `QUALIFY` clause - fixes #1805 * feat: Postgres `NOTNULL` support - incorporates PR #1725, all credits to @tomershay Signed-off-by: Andreas Reichel <andreas@manticore-projects.com> * feat: MySQL `NOT RLIKE`, `NOT REGEXP` expressions - fixes #1553 - remove RegExpMySQLOperator, replaced by flavoured `LIKE` expression Signed-off-by: Andreas Reichel <andreas@manticore-projects.com> * fix: `INSERT` must use simple Column Names only - salvages PR #589, credits to @wheredevel Signed-off-by: Andreas Reichel <andreas@manticore-projects.com> --------- Signed-off-by: Andreas Reichel <andreas@manticore-projects.com> Co-authored-by: zaza <tzarna@gmail.com>
1 parent 51cc444 commit a815f5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1503
-248
lines changed

.github/workflows/gradle.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ "master" ]
13+
pull_request:
14+
branches: [ "master" ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
build:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up JDK 11
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '11'
30+
distribution: 'temurin'
31+
- name: Build with Gradle
32+
uses: gradle/gradle-build-action@v2.4.2
33+
with:
34+
arguments: check

.github/workflows/sphinx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: Install XSLT Processor
1010
run: sudo apt-get install xsltproc sphinx-common
1111
- name: Install dependencies
12-
run: pip install furo sphinx_rtd_theme sphinx-book-theme myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
12+
run: pip install furo myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
1313
- name: Checkout project sources
1414
uses: actions/checkout@v2
1515
with:

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ SELECT 1 FROM dual WHERE a = b
1818
```
1919

2020
```text
21-
SQL Text
22-
└─Statements: net.sf.jsqlparser.statement.select.Select
23-
├─selectItems -> Collection<SelectItem>
24-
│ └─LongValue: 1
25-
├─Table: dual
26-
└─where: net.sf.jsqlparser.expression.operators.relational.EqualsTo
27-
├─Column: a
28-
└─Column: b
21+
SQL Text
22+
└─Statements: statement.select.PlainSelect
23+
├─selectItems: statement.select.SelectItem
24+
│ └─LongValue: 1
25+
├─Table: dual
26+
└─where: expression.operators.relational.EqualsTo
27+
├─Column: a
28+
└─Column: b
2929
```
3030

3131
```java

build.gradle

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77

88
id "ca.coglinc2.javacc" version "latest.release"
99
id 'jacoco'
10+
id 'com.github.kt3k.coveralls' version "latest.release"
1011
id "com.github.spotbugs" version "latest.release"
1112
id "com.diffplug.spotless" version "latest.release"
1213
id 'pmd'
@@ -179,6 +180,10 @@ test {
179180
maxHeapSize = "1G"
180181
}
181182

183+
coveralls {
184+
jacocoReportPath 'build/reports/jacoco/test/jacocoTestReport.xml'
185+
}
186+
182187
jacocoTestReport {
183188
dependsOn test // tests are required to run before generating the report
184189
reports {
@@ -272,9 +277,7 @@ spotbugs {
272277
}
273278

274279
pmd {
275-
consoleOutput = false
276-
//toolVersion = "6.46.0"
277-
280+
consoleOutput = true
278281
sourceSets = [sourceSets.main]
279282

280283
// clear the ruleset in order to use configured rules only
@@ -436,23 +439,6 @@ xslt {
436439
tasks.register('sphinx', Exec) {
437440
dependsOn(gitChangelogTask, renderRR, xslt, updateKeywords, xmldoc)
438441

439-
// doFirst() {
440-
// exec {
441-
// args = [
442-
// "install"
443-
// , "sphinx_rtd_theme"
444-
// , "sphinx-book-theme"
445-
// , "myst_parser"
446-
// , "sphinx-prompt"
447-
// , "sphinx_substitution_extensions"
448-
// , "sphinx_issues"
449-
// , "sphinx_inline_tabs"
450-
// , "pygments"
451-
// ]
452-
// executable "pip"
453-
// }
454-
// }
455-
456442
String PROLOG = """
457443
.. |_| unicode:: U+00A0
458444
:trim:
@@ -555,7 +541,7 @@ publishing {
555541
maven {
556542
name = "GitHubPackages"
557543

558-
url = uri("https://maven.pkg.github.com/manticore-projects/jsqlparser")
544+
url = uri("https://maven.pkg.github.com/JSQLParser/jsqlparser")
559545
credentials(PasswordCredentials)
560546
}
561547
}

src/main/java/net/sf/jsqlparser/expression/ExpressionVisitor.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
4545
import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo;
4646
import net.sf.jsqlparser.expression.operators.relational.RegExpMatchOperator;
47-
import net.sf.jsqlparser.expression.operators.relational.RegExpMySQLOperator;
4847
import net.sf.jsqlparser.expression.operators.relational.SimilarToExpression;
4948
import net.sf.jsqlparser.schema.Column;
5049
import net.sf.jsqlparser.statement.select.AllColumns;
@@ -168,8 +167,6 @@ public interface ExpressionVisitor {
168167

169168
void visit(JsonOperator jsonExpr);
170169

171-
void visit(RegExpMySQLOperator regExpMySQLOperator);
172-
173170
void visit(UserVariable var);
174171

175172
void visit(NumericBind bind);

src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
4545
import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo;
4646
import net.sf.jsqlparser.expression.operators.relational.RegExpMatchOperator;
47-
import net.sf.jsqlparser.expression.operators.relational.RegExpMySQLOperator;
4847
import net.sf.jsqlparser.expression.operators.relational.SimilarToExpression;
4948
import net.sf.jsqlparser.schema.Column;
5049
import net.sf.jsqlparser.statement.select.AllColumns;
@@ -433,11 +432,6 @@ public void visit(JsonOperator expr) {
433432
visitBinaryExpression(expr);
434433
}
435434

436-
@Override
437-
public void visit(RegExpMySQLOperator expr) {
438-
visitBinaryExpression(expr);
439-
}
440-
441435
@Override
442436
public void visit(UserVariable var) {
443437

src/main/java/net/sf/jsqlparser/expression/IntervalExpression.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
*/
1010
package net.sf.jsqlparser.expression;
1111

12-
import java.util.Objects;
1312
import net.sf.jsqlparser.parser.ASTNodeAccessImpl;
1413

14+
import java.util.Objects;
15+
1516
public class IntervalExpression extends ASTNodeAccessImpl implements Expression {
1617

1718
private String parameter = null;
@@ -27,6 +28,10 @@ public IntervalExpression(boolean intervalKeyword) {
2728
this.intervalKeyword = intervalKeyword;
2829
}
2930

31+
public boolean isUsingIntervalKeyword() {
32+
return intervalKeyword;
33+
}
34+
3035
public String getParameter() {
3136
return parameter;
3237
}

src/main/java/net/sf/jsqlparser/expression/TrimFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void accept(ExpressionVisitor expressionVisitor) {
9696
expressionVisitor.visit(this);
9797
}
9898

99-
StringBuilder appendTo(StringBuilder builder) {
99+
public StringBuilder appendTo(StringBuilder builder) {
100100
builder.append("Trim(");
101101

102102
if (trimSpecification != null) {

src/main/java/net/sf/jsqlparser/expression/operators/relational/ExpressionList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public ExpressionList withExpressions(T... expressions) {
7474
return addExpressions(expressions);
7575
}
7676

77-
public ExpressionList withExpressions(Collection<T> expressions) {
77+
public ExpressionList<?> withExpressions(Collection<T> expressions) {
7878
this.clear();
7979
return addExpressions(expressions);
8080
}

src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class IsNullExpression extends ASTNodeAccessImpl implements Expression {
1818
private Expression leftExpression;
1919
private boolean not = false;
2020
private boolean useIsNull = false;
21+
private boolean useNotNull = false;
2122

2223
public Expression getLeftExpression() {
2324
return leftExpression;
@@ -43,14 +44,25 @@ public void setUseIsNull(boolean useIsNull) {
4344
this.useIsNull = useIsNull;
4445
}
4546

47+
public boolean isUseNotNull() {
48+
return useNotNull;
49+
}
50+
51+
public IsNullExpression setUseNotNull(boolean useNotNull) {
52+
this.useNotNull = useNotNull;
53+
return this;
54+
}
55+
4656
@Override
4757
public void accept(ExpressionVisitor expressionVisitor) {
4858
expressionVisitor.visit(this);
4959
}
5060

5161
@Override
5262
public String toString() {
53-
if (isUseIsNull()) {
63+
if (useNotNull) {
64+
return leftExpression + " NOTNULL";
65+
} else if (useIsNull) {
5466
return leftExpression + (not ? " NOT" : "") + " ISNULL";
5567
} else {
5668
return leftExpression + " IS " + (not ? "NOT " : "") + "NULL";

src/main/java/net/sf/jsqlparser/expression/operators/relational/LikeExpression.java

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@
1414
import net.sf.jsqlparser.expression.ExpressionVisitor;
1515

1616
public class LikeExpression extends BinaryExpression {
17+
public enum KeyWord {
18+
LIKE, ILIKE, RLIKE, REGEXP;
19+
20+
public static KeyWord from(String keyword) {
21+
return Enum.valueOf(KeyWord.class, keyword.toUpperCase());
22+
}
23+
}
1724

1825
private boolean not = false;
26+
private boolean useBinary = false;
1927
private Expression escapeExpression = null;
20-
private boolean caseInsensitive = false;
28+
private KeyWord likeKeyWord = KeyWord.LIKE;
2129

2230
public boolean isNot() {
2331
return not;
@@ -27,23 +35,33 @@ public void setNot(boolean b) {
2735
not = b;
2836
}
2937

38+
public boolean isUseBinary() {
39+
return useBinary;
40+
}
41+
42+
public LikeExpression setUseBinary(boolean useBinary) {
43+
this.useBinary = useBinary;
44+
return this;
45+
}
46+
3047
@Override
3148
public void accept(ExpressionVisitor expressionVisitor) {
3249
expressionVisitor.visit(this);
3350
}
3451

52+
@Deprecated
3553
@Override
3654
public String getStringExpression() {
37-
return caseInsensitive ? "ILIKE" : "LIKE";
55+
return likeKeyWord.toString();
3856
}
3957

4058
@Override
4159
public String toString() {
42-
String retval = getLeftExpression() + " " + (not ? "NOT " : "") + getStringExpression() + " " + getRightExpression();
60+
String retval = getLeftExpression() + " " + (not ? "NOT " : "")
61+
+ likeKeyWord + " " + (useBinary ? "BINARY " : "") + getRightExpression();
4362
if (escapeExpression != null) {
44-
retval += " ESCAPE " + escapeExpression ;
63+
retval += " ESCAPE " + escapeExpression;
4564
}
46-
4765
return retval;
4866
}
4967

@@ -55,19 +73,36 @@ public void setEscape(Expression escapeExpression) {
5573
this.escapeExpression = escapeExpression;
5674
}
5775

76+
@Deprecated
5877
public boolean isCaseInsensitive() {
59-
return caseInsensitive;
78+
return likeKeyWord == KeyWord.ILIKE;
6079
}
6180

81+
@Deprecated
6282
public void setCaseInsensitive(boolean caseInsensitive) {
63-
this.caseInsensitive = caseInsensitive;
83+
this.likeKeyWord = KeyWord.ILIKE;
84+
}
85+
86+
public KeyWord getLikeKeyWord() {
87+
return likeKeyWord;
88+
}
89+
90+
public LikeExpression setLikeKeyWord(KeyWord likeKeyWord) {
91+
this.likeKeyWord = likeKeyWord;
92+
return this;
93+
}
94+
95+
public LikeExpression setLikeKeyWord(String likeKeyWord) {
96+
this.likeKeyWord = KeyWord.from(likeKeyWord);
97+
return this;
6498
}
6599

66100
public LikeExpression withEscape(Expression escape) {
67101
this.setEscape(escape);
68102
return this;
69103
}
70104

105+
@Deprecated
71106
public LikeExpression withCaseInsensitive(boolean caseInsensitive) {
72107
this.setCaseInsensitive(caseInsensitive);
73108
return this;

0 commit comments

Comments
 (0)