Skip to content

Commit

Permalink
doc: write about unsupported SQL syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
manticore-projects committed Sep 6, 2023
1 parent daee30f commit 1a6bb7a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/site/sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Java SQL Parser Library
migration
SQL Grammar Stable <syntax_stable>
SQL Grammar Snapshot <syntax_snapshot>
Unsupported Grammar <unsupported>
Java API Stable <javadoc_stable>
Java API Snapshot <javadoc_snapshot>
keywords
Expand Down
57 changes: 57 additions & 0 deletions src/site/sphinx/unsupported.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
***************************************
Unsupported Grammar of various RDBMS
***************************************

*JSQLParser* is a RDBMS agnostic parser with a certain focus on SQL:2016 Standard compliant Queries and the "Big Four" (Oracle, MS SQL Server, Postgres, MySQL/MariaDB).
We would like to recommend writing portable, standard compliant SQL in general.

- Postgres Implicit cast is not supported.

.. code-block:: java
SELECT date '2022-12-31';
SELECT double precision 1;
- Oracle PL/SQL blocks are not support.

.. code-block:: sql
DECLARE
num NUMBER;
BEGIN
num := 10;
dbms_output.put_line('The number is ' || num);
END;
- Oracle `INSERT ALL ...` is not supported

.. code-block:: sql
INSERT ALL
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
SELECT * FROM dual;
- DDL statements

While *JSQLParser* provides a lot of generic support for DDL statements, it is possible that certain RDBMS specific syntax (especially about indices, encodings, compression) won't be supported.

- `JSON` or `XML` specific syntax and functions

While *JSQLParser* provides a lot of generic support for `JSON` or `XML` processing, it is possible that certain RDBMS specific syntax or functions won't be supported.

- Interval Operators

Anything like `DAY HOUR MINUTE SECOND [TO HOUR MINUTE SECOND]` is not supported.:

.. code-block:: sql
values cast ((time '12:03:34' - time '11:57:23') minute to second as varchar(8));

0 comments on commit 1a6bb7a

Please sign in to comment.