Skip to content

Commit 2b4a929

Browse files
doc: write migration guide
1 parent cb960a3 commit 2b4a929

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/site/sphinx/migration.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*********************************
2+
Migration to JSQLParser Version 5
3+
*********************************
4+
5+
* ``ValueListExpression`` has been replaced by ``Values``, which implements ``Select`` `Statement` and `Expression`
6+
* ``ValuesStatement`` has been replaced by ``Values``, which implements ``Select`` `Statement` and `Expression`
7+
* ``ItemsList`` has been removed and ``ExpressionList`` is used instead
8+
* ``MultiExpressionList`` has been removed and ``ExpressionList`` is used instead (with ``ExpressionList`` elements)
9+
* ``SelectBody`` has been removed and `PlainSelect` can be used directly
10+
* ``SubJoin`` has been removed, using normal ```ParenthesedFromItem`` instead
11+
* ``SubSelect`` has been removed and any instance of ``Select`` (`PlainSelect`, `Values` or `SetOperationList`) can be used instead
12+
*
13+
14+
* `hasBrackets()`, 'isUsingBrackets()' and similar methods have been removed, instead the Parser will return ``ParenthesedExpressionList`` or ``ParenthesedSelect`` or ```ParenthesedFromItem`` or ``Parenthesis`` wrapping the object within brackets
15+
16+
* any instance of `List<Expression>` is considered an Anti Pattern and `ExpressionList<?>` shall be used instead
17+
18+
* ``List<UpdateSet>`` is used for any `Set` clause within `Insert`, `Update`, `Upsert` or `Merge` statements
19+
20+
* ``Statements`` extends `List<Statement>` directly and so ``Statements.getStatements()`` is obsolete
21+

0 commit comments

Comments
 (0)