mention SQL arrays in HQL documentation

This commit is contained in:
Gavin King 2024-11-16 23:34:00 +01:00
parent 223855a104
commit 8f85e6ca47
3 changed files with 16 additions and 3 deletions

View File

@ -1169,6 +1169,17 @@ Finally, the following functions evaluate the id, version, or natural id of an e
Useful with associations annotated `@NotFound`. | ✖ Useful with associations annotated `@NotFound`. | ✖
|=== |===
[[array-functions]]
==== Array, XML, and JSON functions
On supported platforms, HQL provides a rich suite of functions for working with:
- link:{doc-user-guide-url}#hql-functions-arrays[SQL arrays],
- link:{doc-user-guide-url}#hql-functions-json[JSON], and
- link:{doc-user-guide-url}#hql-functions-xml[XML]
The use of these functions is outside the scope of this guide.
[[embedding-sql]] [[embedding-sql]]
==== Embedding SQL expressions ==== Embedding SQL expressions
@ -1442,8 +1453,9 @@ This less-than-lovely fragment of the HQL ANTLR grammar tells us that the thing
- a list of values enclosed in parentheses, - a list of values enclosed in parentheses,
- a subquery, - a subquery,
- one of the collection-handling functions defined <<elements-indices,above>>, or - one of the collection-handling functions defined <<elements-indices,above>>,
- a query parameter, - a query parameter, or
- an expression evaluating to a link:{doc-introduction-url}#arrays[SQL array].
The type of the expression on the left, and the types of all the values on the right must be compatible. The type of the expression on the left, and the types of all the values on the right must be compatible.

View File

@ -212,7 +212,7 @@ Every explicit association join specifies an entity attribute to be joined.
The specified attribute: The specified attribute:
* is usually a `@OneToMany`, `@ManyToMany`, `@OneToOne`, or `@ManyToOne` association, but * is usually a `@OneToMany`, `@ManyToMany`, `@OneToOne`, or `@ManyToOne` association, but
* it could be an `@ElementCollection`, and * it could be an `@ElementCollection`, or even just a link:{doc-introduction-url}#arrays[SQL array], and
* it might even be an attribute of embeddable type. * it might even be an attribute of embeddable type.
In the case of an association or collection, the generated SQL will have a join of the same type. In the case of an association or collection, the generated SQL will have a join of the same type.

View File

@ -5,3 +5,4 @@ inList
| "(" (expression ("," expression)*)? ")" | "(" (expression ("," expression)*)? ")"
| "(" subquery ")" | "(" subquery ")"
| parameter | parameter
| expression