Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSQLParser 5.0 #1778

Merged
merged 107 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
747152a
Fixes #1684: Support CREATE MATERIALIZED VIEW with AUTO REFRESH
zaza Dec 11, 2022
9e09005
Merge branch 'master' into 1684-create-mv-auto-refresh
zaza Dec 22, 2022
ea4477b
Reduce cyclomatic complexity in CreateView.toString
zaza Jan 8, 2023
b5321d6
Enhanced Keywords
manticore-projects Oct 18, 2021
5fae2f5
Fix incorrect tests
manticore-projects Oct 18, 2021
f49e828
Define Reserved Keywords explicitly
manticore-projects Oct 24, 2021
86f337d
Fix test resources
manticore-projects Oct 24, 2021
2d51a82
Adjust Gradle to JUnit 5
manticore-projects Nov 22, 2021
232aff6
Do not mark SpeedTest for concurrent execution
manticore-projects Nov 24, 2021
3ba5410
Remove unused imports
manticore-projects Nov 28, 2021
e960a35
Adjust Gradle to JUnit 5
manticore-projects Nov 22, 2021
67f7951
Do not mark SpeedTest for concurrent execution
manticore-projects Nov 24, 2021
a016be0
Remove unused imports
manticore-projects Nov 28, 2021
2ef6637
Sphinx Documentation
manticore-projects Sep 2, 2022
57193b8
doc: request for `Conventional Commit` messages
manticore-projects Sep 6, 2022
b94b2cc
feat: make important Classes Serializable
manticore-projects Sep 15, 2022
02202c5
chore: Make Serializable
manticore-projects Oct 14, 2022
a3ca325
doc: Better integration of the RR diagrams
manticore-projects Jan 7, 2023
fcb5ab1
Merge
manticore-projects Jan 7, 2023
c57c427
feat: Oracle Alternative Quoting
manticore-projects Jan 29, 2023
2aec1f6
style: Appease PMD/Codacy
manticore-projects Jan 29, 2023
1c8d8da
feat: CREATE VIEW ... REFRESH AUTO...
manticore-projects Jan 30, 2023
b707b23
doc: fix the issue template
manticore-projects Feb 1, 2023
46314c4
Update issue templates
manticore-projects Feb 1, 2023
4aeafbc
Update issue templates
manticore-projects Feb 1, 2023
b081484
feat: Support more Statement Separators
manticore-projects Feb 2, 2023
5885e1c
Merge remote-tracking branch 'origin/master'
manticore-projects Feb 13, 2023
581d97a
Merge branch 'master' of https://github.com/JSQLParser/JSqlParser
manticore-projects Feb 24, 2023
0979b2e
feat: FETCH uses EXPRESSION
manticore-projects Mar 7, 2023
ed17f87
style: apply Spotless
manticore-projects Mar 7, 2023
96808d2
test: commit missing test
manticore-projects Mar 7, 2023
21c4550
Merge branch 'master' of https://github.com/JSQLParser/JSqlParser
manticore-projects Mar 12, 2023
e8a29de
Merge branch 'master' of https://github.com/JSQLParser/JSqlParser
manticore-projects Apr 29, 2023
8a1bdec
feat: Lateral View
manticore-projects Apr 29, 2023
4efb99f
feat: Oracle `HAVING` before `GROUP BY`
manticore-projects Apr 29, 2023
9da7a06
feat: Multi-Part Names for Variables and Parameters
manticore-projects Apr 29, 2023
4b7f21c
feat: ClickHouse `Select...` ``FINAL` modifier
manticore-projects Apr 29, 2023
6281b07
feat: Test if a JOIN is an INNER JOIN according to the SQL:2016
manticore-projects Apr 30, 2023
b6ea8b1
feat: Switch off contradicting `JOIN` qualifiers, when setting a qual…
manticore-projects Apr 30, 2023
3a27a9d
feat: implement SQL:2016 Convert() and Trim()
manticore-projects Apr 30, 2023
4d5e26d
feat: ClickHouse `LIMIT ... BY ...` clause
manticore-projects Apr 30, 2023
f0a6f37
test: add specific tests for closed issues
manticore-projects Apr 30, 2023
ff16faf
test: add specific tests for closed issues
manticore-projects Apr 30, 2023
b9057d2
refactor: remove `SelectExpressionItem` in favor of `SelectItem`
manticore-projects Apr 30, 2023
286834d
doc: Update examples
manticore-projects Apr 30, 2023
0be65a4
build: Add missing import
manticore-projects Apr 30, 2023
4ddc835
doc: Update the README.md
manticore-projects May 1, 2023
fc577ca
fix: assign Enum case insensitive
manticore-projects May 2, 2023
86d0ace
fix: assign Enum case insensitive
manticore-projects May 2, 2023
a5140c7
Revert "fix: assign Enum case insensitive"
manticore-projects May 2, 2023
288b177
feat: Consolidate the `ExpressionList`, removing many redundant List …
manticore-projects May 3, 2023
905ef65
fix: Remove tests for `()`, since `ParenthesedExpressionList` will ca…
manticore-projects May 3, 2023
85b3bc4
refactor: UpdateSets for `Update` and `InsertConflictTarget`
manticore-projects May 3, 2023
e16ba5d
build: Increase TimeOut for the GitHub CI
manticore-projects May 3, 2023
2eb8c80
style: Appease Codacy
manticore-projects May 3, 2023
f449263
style: Checkstyle
manticore-projects May 3, 2023
141708e
refactor: Remove `ItemsList`, `MultiExpressionList`, `Replace`
manticore-projects May 4, 2023
67b3804
style: Appease Codacy
manticore-projects May 4, 2023
f89df27
style: Rework all the ENUMs
manticore-projects May 5, 2023
a590036
doc: Better Sphinx Tabs
manticore-projects May 6, 2023
c81d60a
doc: RR chart colors cater for Dark Mode
manticore-projects May 6, 2023
3903a80
refactor: remove SimpleFunction
manticore-projects May 6, 2023
2d200b0
build: improve Gradle Build
manticore-projects May 7, 2023
89600d4
refactor: `Insert` uses `ExpressionList` and `UpdateSet`
manticore-projects May 7, 2023
a11febb
test: Disable API Sanitation for the moment
manticore-projects May 7, 2023
399e1d7
style: Appease Checkstyle
manticore-projects May 7, 2023
f5d35d0
style: Appease PMD
manticore-projects May 7, 2023
21389b7
fix: find the correct position when field belongs to an internal class
manticore-projects May 9, 2023
52df291
style: replace all List<Expression> with ExpressionList<> and enforce…
manticore-projects May 9, 2023
9fbdaae
refactor: generify `SelectItem` and remove `FunctionItem` and `Expres…
manticore-projects May 9, 2023
7cecd29
fix: Java Version 8
manticore-projects May 9, 2023
c07a43b
feat: JdbcNamedParameter allows "&" (instead of ":")
manticore-projects May 11, 2023
09a70a4
feat: access Elements of Array Columns
manticore-projects May 11, 2023
6e7a78d
feat: `MEMBER OF` condition as shown at https://dev.mysql.com/doc/ref…
manticore-projects May 11, 2023
8a75aa7
style: appease PMD/Codacy
manticore-projects May 11, 2023
ce2b18a
style: appease PMD/Codacy
manticore-projects May 11, 2023
c9dce62
Merge remote-tracking branch 'manticore/Lateral_View' into Lateral_View
manticore-projects May 11, 2023
decf662
test: add unit test for issue #1778
manticore-projects May 11, 2023
c53667f
feat: Write API documentation to the WebSite via XMLDoclet
manticore-projects May 14, 2023
1132338
Update sphinx.yml
manticore-projects May 14, 2023
f3e8952
build: Sphinx build fixes
manticore-projects May 14, 2023
f515cda
Merge branch 'master' of https://github.com/manticore-projects/JSqlPa…
manticore-projects May 14, 2023
11b563c
build: Sphinx build fixes
manticore-projects May 14, 2023
961378d
build: Sphinx build fixes
manticore-projects May 14, 2023
48d5340
Merge branch 'master' of https://github.com/manticore-projects/JSqlPa…
manticore-projects May 14, 2023
8fb9110
build: improve the GIT Snapshot detection
manticore-projects May 15, 2023
88d1b62
fix: issue #1791
manticore-projects May 15, 2023
d20c8e9
fix: issue #1789
manticore-projects May 16, 2023
32ec561
fix: issue #1789
manticore-projects May 16, 2023
9fa0f4b
Merge remote-tracking branch 'manticore/Lateral_View' into Lateral_View
manticore-projects May 16, 2023
01a5fb7
refactor: simplify production `CreateParameter()`
manticore-projects May 16, 2023
daa56ed
refactor: SHOW statement, supporting any RDBMS specific implementation
manticore-projects May 16, 2023
4fb1cfb
refactor: RETURNING clause
manticore-projects May 16, 2023
da32442
refactor: CREATE and ALTER productions
manticore-projects May 16, 2023
4f0488c
fix: Complex Parsing Approach
manticore-projects May 17, 2023
3ff9774
style: Quieten the logger
manticore-projects May 17, 2023
a7dfb94
style: Cosmetic improvements
manticore-projects May 17, 2023
6ef5e0b
feat: chaining JSON Expressions
manticore-projects May 17, 2023
4f91746
style: remove unused imports
manticore-projects May 17, 2023
9dafae8
refact: Statements extends List<Statement>
manticore-projects May 17, 2023
4bdabed
build: try to work around the Maven/JDK8 issue on GitHub
manticore-projects May 17, 2023
64b0331
feat: parse CREATE TRIGGER as UnsupportedStatement
manticore-projects May 17, 2023
e19dc0e
feat: functions blocks, parenthesed JSON Expressions
manticore-projects May 18, 2023
5263b91
feat: functions blocks, parenthesed JSON Expressions
manticore-projects May 18, 2023
73c55fd
feat: Quoted Identifiers can contain double-quotes (PostgreSQL)
manticore-projects May 18, 2023
a558871
build: improve Upload task
manticore-projects May 19, 2023
5e7732c
doc: Website improvements
manticore-projects May 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Install XSLT Processor
run: sudo apt-get install xsltproc sphinx-common
- name: Install dependencies
run: pip install sphinx_rtd_theme sphinx-book-theme myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_tabs pygments
run: pip install sphinx_rtd_theme sphinx-book-theme myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx-tabs sphinx_inline_tabs pygments
- name: Checkout project sources
uses: actions/checkout@v2
with:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle Wrapper
run: gradle sphinx
run: gradle --no-build-cache clean xmldoc sphinx
- name: Deploy
uses: actions/configure-pages@v2
- name: Upload artifact
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

# Exclude the Auto-generated Changelog
/src/site/sphinx/changelog.rst
/src/site/sphinx/javadoc_stable.rst
/src/site/sphinx/syntax_stable.rst

# Generated by javacc-maven-plugin
/bin
Expand All @@ -27,3 +29,5 @@
/nbproject/

/.gradle
/src/site/sphinx/javadoc_snapshot.rst
/src/site/sphinx/syntax_snapshot.rst
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,34 @@ SELECT 1 FROM dual WHERE a = b

```text
SQL Text
└─Statements: net.sf.jsqlparser.statement.select.PlainSelect
├─selectItems -> Collection<SelectExpressionItem>
│ └─selectItems: net.sf.jsqlparser.statement.select.SelectExpressionItem
│ └─LongValue: 1
├─Table: dual
└─where: net.sf.jsqlparser.expression.operators.relational.EqualsTo
├─Column: a
└─Column: b
└─Statements: net.sf.jsqlparser.statement.select.Select
├─selectItems -> Collection<SelectItem>
│ └─LongValue: 1
├─Table: dual
└─where: net.sf.jsqlparser.expression.operators.relational.EqualsTo
├─Column: a
└─Column: b
```

```java
Statement statement = CCJSqlParserUtil.parse(sqlStr);
if (statement instanceof PlainSelect) {
PlainSelect plainSelect = (PlainSelect) statement;
String sqlStr = "select 1 from dual where a=b";

SelectExpressionItem selectExpressionItem =
(SelectExpressionItem) plainSelect.getSelectItems().get(0);
PlainSelect select = (PlainSelect) CCJSqlParserUtil.parse(sqlStr);

Table table = (Table) plainSelect.getFromItem();
SelectItem selectItem =
select.getSelectItems().get(0);
Assertions.assertEquals(
new LongValue(1)
, selectItem.getExpression());

EqualsTo equalsTo = (EqualsTo) plainSelect.getWhere();
Column a = (Column) equalsTo.getLeftExpression();
Column b = (Column) equalsTo.getRightExpression();
Table table = (Table) select.getFromItem();
Assertions.assertEquals("dual", table.getName());

EqualsTo equalsTo = (EqualsTo) select.getWhere();
Column a = (Column) equalsTo.getLeftExpression();
Column b = (Column) equalsTo.getRightExpression();
Assertions.assertEquals("a", a.getColumnName());
Assertions.assertEquals("b", b.getColumnName());
}
```

Expand Down
Loading