Skip to content
Merged
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
30 changes: 28 additions & 2 deletions modules/ROOT/pages/functions/scalar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ANY>` or the number of Unicode characters in a `STRING`.
| *Description* 3+| Returns the number of items in a `LIST<ANY>`, the number of Unicode characters in a `STRING` or the dimension of a `VECTOR`.
.2+| *Arguments* | *Name* | *Type* | *Description*
| `input` | `STRING \| LIST<ANY>` | A value whose length is to be calculated.
| `input` | `STRING \| LIST<ANY> \| VECTOR` | A value whose length is to be calculated.
| *Returns* 3+| `INTEGER`
|===

Expand Down Expand Up @@ -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*<m"]
|===

| size
| 3
1+d|Rows: 1

|===

The dimension of the vector is returned.

======

[TIP]
You can also use the xref:functions/vector.adoc#functions-vector_dimension_count[`vector_dimension_count()`] function to return the dimension of a `VECTOR` value.


[[functions-startnode]]
== startNode()
Expand Down