You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A huge thank you to our sponsor, [Starlake.ai](https://starlake.ai/) who simplifies data ingestion, transformation, and orchestration, enabling faster delivery of high-quality data. Starlake has been instrumental in providing Piped SQL and numerous test cases for BigQuery, Redshift, DataBricks, and DuckDB. Show your support for ongoing development by visiting Starlake.ai and giving us a star!
11
+
10
12
## Summary
11
13
12
-
Please visit the[WebSite](https://jsqlparser.github.io/JSqlParser). **JSqlParser** is a RDBMS agnostic SQL statement parser. It translates SQL statements into a traversable hierarchy of Java classes (see [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#parse-a-sql-statements)):
14
+
Please visit our[WebSite](https://jsqlparser.github.io/JSqlParser) for detailed information. **JSqlParser** is a RDBMS agnostic SQL statement parser. It translates SQL statements into a traversable hierarchy of Java classes (see [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#parse-a-sql-statements)):
13
15
14
16
```sql
15
17
SELECT1FROM dual WHERE a = b
16
-
```
17
18
18
-
```text
19
+
/* produces the following AST
20
+
19
21
SQL Text
20
22
└─Statements: statement.select.PlainSelect
21
23
├─selectItems: statement.select.SelectItem
@@ -24,6 +26,7 @@ SQL Text
24
26
└─where: expression.operators.relational.EqualsTo
25
27
├─Column: a
26
28
└─Column: b
29
+
*/
27
30
```
28
31
29
32
```java
@@ -45,7 +48,6 @@ Column a = (Column) equalsTo.getLeftExpression();
45
48
Column b = (Column) equalsTo.getRightExpression();
46
49
Assertions.assertEquals("a", a.getColumnName());
47
50
Assertions.assertEquals("b", b.getColumnName());
48
-
}
49
51
```
50
52
51
53
JSQLParser-4.9 was the last JDK8 compatible version. The recent JSQLParser-5.0 depends on JDK11 and introduces API breaking changes to the AST Visitors. Please see the Migration Guide for the details.
@@ -54,10 +56,11 @@ JSQLParser-4.9 was the last JDK8 compatible version. The recent JSQLParser-5.0 d
54
56
55
57
**JSqlParser** aims to support the SQL standard as well as all major RDBMS. Any missing syntax or features can be added on demand.
| Oracle<br>MS SQL Server and Sybase<br>Postgres<br>MySQL and MariaDB<br>DB2<br>H2 and HSQLDB and Derby<br>SQLite |`SELECT`<br>`INSERT`, `UPDATE`, `UPSERT`, `MERGE`<br>`DELETE`, `TRUNCATE TABLE`<br>`CREATE ...`, `ALTER ....`, `DROP ...`<br>`WITH ...`|
| Oracle<br>MS SQL Server and Sybase<br>Postgres<br>MySQL and MariaDB<br>DB2<br>H2 and HSQLDB and Derby<br>SQLite |`SELECT`<br>`INSERT`, `UPDATE`, `UPSERT`, `MERGE`<br>`DELETE`, `TRUNCATE TABLE`<br>`CREATE ...`, `ALTER ....`, `DROP ...`<br>`WITH ...`|
62
+
| Salesforce SOQL |`INCLUDES`, `EXCLUDES`|
63
+
| Piped SQL (also know as FROM SQL) ||
61
64
62
65
**JSqlParser** can also be used to create SQL Statements from Java Code with a fluent API (see [Samples](https://jsqlparser.github.io/JSqlParser/usage.html#build-a-sql-statements)).
63
66
@@ -67,7 +70,7 @@ If you like JSqlParser then please check out its related projects:
67
70
68
71
*[JSQLFormatter](https://manticore-projects.com/JSQLFormatter/index.html) for pretty printing and formatting SQL Text
69
72
70
-
*[JSQLTranspiler](https://manticore-projects.com/JSQLTranspiler/index.html) for dialect specific rewriting, SQL Column resolution and Lineage
73
+
*[JSQLTranspiler](https://manticore-projects.com/JSQLTranspiler/index.html) for dialect specific rewriting, SQL Column resolution and Lineage, provided by [Starlake.ai](https://starlake.ai/)
71
74
72
75
## Alternatives to JSqlParser?
73
76
[**General SQL Parser**](http://www.sqlparser.com/features/introduce.php?utm_source=github-jsqlparser&utm_medium=text-general) looks pretty good, with extended SQL syntax (like PL/SQL and T-SQL) and java + .NET APIs. The tool is commercial (license available online), with a free download option.
0 commit comments