diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index a04a1db7f..033767527 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -74,6 +74,7 @@ *** xref:expressions/predicates/path-pattern-expressions.adoc[] *** xref:expressions/predicates/type-predicate-expressions.adoc[] ** xref:expressions/mathematical-operators.adoc[] +** xref:expressions/string-operators.adoc[] ** xref:expressions/conditional-expressions.adoc[] * xref:functions/index.adoc[] diff --git a/modules/ROOT/pages/expressions/index.adoc b/modules/ROOT/pages/expressions/index.adoc index 49bb55a52..97415b831 100644 --- a/modules/ROOT/pages/expressions/index.adoc +++ b/modules/ROOT/pages/expressions/index.adoc @@ -12,4 +12,6 @@ For details and examples of specific expressions, see the following sections: ** xref:expressions/predicates/path-pattern-expressions.adoc[]: information about filtering queries with path pattern expressions. ** xref:expressions/predicates/type-predicate-expressions.adoc[]: information about how to verify the value type of a Cypher expression. * xref:expressions/mathematical-operators.adoc[]: `+`, `-`, `*`, `/`, `%`, `^`. +* xref:expressions/string-operators.adoc[]: `+`, `||` * xref:expressions/conditional-expressions.adoc[] + diff --git a/modules/ROOT/pages/expressions/string-operators.adoc b/modules/ROOT/pages/expressions/string-operators.adoc new file mode 100644 index 000000000..e0fd193e0 --- /dev/null +++ b/modules/ROOT/pages/expressions/string-operators.adoc @@ -0,0 +1,226 @@ += String concatenation operators +:description: Information about Cypher's string concatenation operators. +:table-caption!: + +Cypher contains two operators for the concatenation of `STRING` values: + +* `||` +* `+` + +The two operators are functionally equivalent. +However, `||` is xref:appendix/gql-conformance/index.adoc[GQL conformant], while `+` is not. + +For additional expressions that evaluate to `STRING` values, see xref:functions/string.adoc[String functions]. + +[[examples]] +== Examples + +.`||` and `+` +[source, cypher] +---- +RETURN 'Neo' || '4j' AS result1, + 'Neo' + '4j' AS result2 +---- + +.Result +[role="queryresult",options="header,footer",cols="2*