From 4d8ec536f3c640ea4a178166338edbebb5126c8b Mon Sep 17 00:00:00 2001 From: Louise Berglund Date: Fri, 16 Jan 2026 15:15:45 +0100 Subject: [PATCH] Add documentation for size() of vector values. This seems to have been overlooked when the new vector functions were added. --- modules/ROOT/pages/functions/scalar.adoc | 30 ++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/functions/scalar.adoc b/modules/ROOT/pages/functions/scalar.adoc index 9f486d832..8c0a78168 100644 --- a/modules/ROOT/pages/functions/scalar.adoc +++ b/modules/ROOT/pages/functions/scalar.adoc @@ -709,9 +709,9 @@ A randomly-generated UUID is returned. .Details |=== | *Syntax* 3+| `size(input)` -| *Description* 3+| Returns the number of items in a `LIST` or the number of Unicode characters in a `STRING`. +| *Description* 3+| Returns the number of items in a `LIST`, the number of Unicode characters in a `STRING` or the dimension of a `VECTOR`. .2+| *Arguments* | *Name* | *Type* | *Description* -| `input` | `STRING \| LIST` | A value whose length is to be calculated. +| `input` | `STRING \| LIST \| VECTOR` | A value whose length is to be calculated. | *Returns* 3+| `INTEGER` |=== @@ -802,6 +802,32 @@ The number of characters in the `STRING` `'Charlie'` is returned. ====== +.+size()+ applied to vectors +====== + +.Query +[source, cypher] +---- +RETURN size(vector([1, 2, 3], 3, INTEGER8)) AS size +---- + +.Result +[role="queryresult",options="header,footer",cols="1*