From 8f85e6ca47bda7266c590c537bc219980582f414 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 16 Nov 2024 23:34:00 +0100 Subject: [PATCH] mention SQL arrays in HQL documentation --- .../main/asciidoc/querylanguage/Expressions.adoc | 16 ++++++++++++++-- .../src/main/asciidoc/querylanguage/From.adoc | 2 +- .../querylanguage/extras/predicate_in_bnf.txt | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/documentation/src/main/asciidoc/querylanguage/Expressions.adoc b/documentation/src/main/asciidoc/querylanguage/Expressions.adoc index 77b1d01722..756899a22b 100644 --- a/documentation/src/main/asciidoc/querylanguage/Expressions.adoc +++ b/documentation/src/main/asciidoc/querylanguage/Expressions.adoc @@ -1169,6 +1169,17 @@ Finally, the following functions evaluate the id, version, or natural id of an e 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 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 subquery, -- one of the collection-handling functions defined <>, or -- a query parameter, +- one of the collection-handling functions defined <>, +- 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. diff --git a/documentation/src/main/asciidoc/querylanguage/From.adoc b/documentation/src/main/asciidoc/querylanguage/From.adoc index 3af419ab74..6e1674026e 100644 --- a/documentation/src/main/asciidoc/querylanguage/From.adoc +++ b/documentation/src/main/asciidoc/querylanguage/From.adoc @@ -212,7 +212,7 @@ Every explicit association join specifies an entity attribute to be joined. The specified attribute: * 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. In the case of an association or collection, the generated SQL will have a join of the same type. diff --git a/documentation/src/main/asciidoc/querylanguage/extras/predicate_in_bnf.txt b/documentation/src/main/asciidoc/querylanguage/extras/predicate_in_bnf.txt index a4cee83588..67d193ddfc 100644 --- a/documentation/src/main/asciidoc/querylanguage/extras/predicate_in_bnf.txt +++ b/documentation/src/main/asciidoc/querylanguage/extras/predicate_in_bnf.txt @@ -5,3 +5,4 @@ inList | "(" (expression ("," expression)*)? ")" | "(" subquery ")" | parameter + | expression