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

two minor things #9192

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ jsonValueReturningClause
;

jsonValueOnErrorOrEmptyClause
: ( ERROR | NULL | ( DEFAULT expression ) ) ON (ERROR|EMPTY)
: (ERROR | NULL | DEFAULT expression) ON (ERROR | EMPTY)
;

/**
Expand All @@ -1674,12 +1674,13 @@ jsonQueryFunction
;

jsonQueryWrapperClause
: WITH (CONDITIONAL|UNCONDITIONAL)? ARRAY? WRAPPER
: WITH (CONDITIONAL | UNCONDITIONAL)? ARRAY? WRAPPER
| WITHOUT ARRAY? WRAPPER
;

jsonQueryOnErrorOrEmptyClause
: ( ERROR | NULL | ( EMPTY ( ARRAY | OBJECT )? ) ) ON (ERROR|EMPTY);
: (ERROR | NULL | EMPTY (ARRAY | OBJECT)?) ON (ERROR | EMPTY)
;

/**
* The 'json_exists()' function
Expand All @@ -1689,7 +1690,8 @@ jsonExistsFunction
;

jsonExistsOnErrorClause
: ( ERROR | TRUE | FALSE ) ON ERROR;
: (ERROR | TRUE | FALSE) ON ERROR
;

/**
* The 'json_array()' function
Expand All @@ -1707,11 +1709,12 @@ jsonObjectFunction

jsonObjectFunctionEntries
: expressionOrPredicate COMMA expressionOrPredicate (COMMA expressionOrPredicate COMMA expressionOrPredicate)*
| (KEY? expressionOrPredicate VALUE expressionOrPredicate | expressionOrPredicate COLON expressionOrPredicate) (COMMA (KEY? expressionOrPredicate VALUE expressionOrPredicate | expressionOrPredicate COLON expressionOrPredicate))*
| (KEY? expressionOrPredicate VALUE expressionOrPredicate | expressionOrPredicate COLON expressionOrPredicate)
(COMMA (KEY? expressionOrPredicate VALUE expressionOrPredicate | expressionOrPredicate COLON expressionOrPredicate))*
;

jsonNullClause
: (ABSENT|NULL) ON NULL
: (ABSENT | NULL) ON NULL
;

/**
Expand All @@ -1725,19 +1728,19 @@ jsonArrayAggFunction
* The 'json_objectagg()' function
*/
jsonObjectAggFunction
: JSON_OBJECTAGG LEFT_PAREN KEY? expressionOrPredicate (VALUE|COLON) expressionOrPredicate jsonNullClause? jsonUniqueKeysClause? RIGHT_PAREN filterClause?
: JSON_OBJECTAGG LEFT_PAREN KEY? expressionOrPredicate (VALUE | COLON) expressionOrPredicate jsonNullClause? jsonUniqueKeysClause? RIGHT_PAREN filterClause?
;

jsonUniqueKeysClause
: (WITH|WITHOUT) UNIQUE KEYS
: (WITH | WITHOUT) UNIQUE KEYS
;

jsonTableFunction
: JSON_TABLE LEFT_PAREN expression (COMMA expression)? jsonPassingClause? jsonTableColumnsClause jsonTableErrorClause? RIGHT_PAREN
;

jsonTableErrorClause
: (ERROR|NULL) ON ERROR
: (ERROR | NULL) ON ERROR
;

jsonTableColumnsClause
Expand Down
7 changes: 7 additions & 0 deletions migration-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ This is now done across the entire set of `hbm.xml` files at once.
While most users will never see this change, it might impact integrations which tie-in to XML processing.
====

[[mysql-varchar]]
== Default DDL type for `char` and `Character` on MySQL

Previously, `char` and `Character` fields were, by default, mapped to `char(1)` columns by the schema export tool.
However, MySQL treats a `char(1)` containing a single space as an empty string, resulting in broken behavior for some HQL and SQL functions.
Now, `varchar(1)` is used by default.

[[cleanup]]
== Cleanup

Expand Down
Loading