From 5c1b726f6bdbaae1de67408580101f1194d58b06 Mon Sep 17 00:00:00 2001 From: Ayesha Firdaus Date: Sat, 20 Jun 2026 01:36:54 +0530 Subject: [PATCH] DOC-2742-open-cypher-4.2 --- modules/openCypher-in-gsql/pages/index.adoc | 6 ++++ .../pages/func/datetime-functions.adoc | 25 +++++++++++++++ modules/querying/pages/func/edge-methods.adoc | 32 +++++++++++++++++++ .../querying/pages/func/list-functions.adoc | 32 +++++++++++++++++++ .../pages/func/mathematical-functions.adoc | 19 +++++++++++ 5 files changed, 114 insertions(+) diff --git a/modules/openCypher-in-gsql/pages/index.adoc b/modules/openCypher-in-gsql/pages/index.adoc index a7d6fb79..fa9a4c43 100644 --- a/modules/openCypher-in-gsql/pages/index.adoc +++ b/modules/openCypher-in-gsql/pages/index.adoc @@ -234,6 +234,12 @@ See below for restrictions before version *4.1.2*. |type() |Scalar |Returns the string representation of the relationship type. |=== + +[NOTE] +==== +All OpenCypher functions listed below can be used in GSQL mode, and all primitive GSQL functions can be used in OpenCypher mode. +==== + === Expressions [cols="1,3"] |=== diff --git a/modules/querying/pages/func/datetime-functions.adoc b/modules/querying/pages/func/datetime-functions.adoc index 1935b5e9..392faefe 100644 --- a/modules/querying/pages/func/datetime-functions.adoc +++ b/modules/querying/pages/func/datetime-functions.adoc @@ -218,6 +218,31 @@ Converts a `DATETIME` value to epoch time. datetime_to_epoch(to_datetime("1970-01-01 00:01:00")) -> 60 ---- +== timestamp() + +=== Syntax + +`timestamp()` + +=== Description + +Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. + +=== Return type + +`INT` + +=== Parameters + +None. + +=== Example + +[source,text] +---- +timestamp() -> 1609459200000 +---- + == `day()` [discrete] diff --git a/modules/querying/pages/func/edge-methods.adoc b/modules/querying/pages/func/edge-methods.adoc index 6d17dad3..b55ff91d 100644 --- a/modules/querying/pages/func/edge-methods.adoc +++ b/modules/querying/pages/func/edge-methods.adoc @@ -222,3 +222,35 @@ GSQL > run query elementId_example() ] } ---- + +== type() + +=== Syntax + +`type(e)` + +=== Description + +Returns the string representation of the edge type. + +=== Return type + +`STRING` + +=== Parameters + +|=== +| Parameter | Description | Data type + +| `e` +| The edge whose type will be returned. +| `EDGE` + +|=== + +=== Example + +[source,text] +---- +type(e) -> "worksFor" +---- \ No newline at end of file diff --git a/modules/querying/pages/func/list-functions.adoc b/modules/querying/pages/func/list-functions.adoc index 24afc468..c97a246f 100644 --- a/modules/querying/pages/func/list-functions.adoc +++ b/modules/querying/pages/func/list-functions.adoc @@ -200,3 +200,35 @@ split("aaabcaabca", "abc") -> ["aa", "a", "a"] ---- tail(["a", "b", "c"]) -> ["b", "c"] ---- + +== labels() + +=== Syntax + +`labels(vertex)` + +=== Description + +Returns a `LIST` containing the string representation of the type of the given vertex. + +=== Return type + +`LIST` + +=== Parameters + +|=== +| Parameter | Description | Data type + +| `vertex` +| The vertex whose type will be returned. +| `VERTEX` + +|=== + +=== Example + +[source,text] +---- +labels(v) -> ["person"] +---- \ No newline at end of file diff --git a/modules/querying/pages/func/mathematical-functions.adoc b/modules/querying/pages/func/mathematical-functions.adoc index 6085ff4a..c2b86bd2 100644 --- a/modules/querying/pages/func/mathematical-functions.adoc +++ b/modules/querying/pages/func/mathematical-functions.adoc @@ -647,6 +647,25 @@ Return the common logarithm of a number (base 10). | Number |=== +== e() + +=== Syntax + +`e()` + +=== Description + +Returns the base of the natural logarithm, e (approximately 2.718281828459045). + +=== Return type + +`FLOAT` + +=== Parameters + +None. + + == Trigonometric === acos()