Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update value types: STRING #868

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/listing-settings.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ SHOW SETTING[S] [setting-name[,...]]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
----

Setting names must be supplied as one or more comma-separated quoted strings or as an expression resolving to a string or a list of strings.
Setting names must be supplied as one or more comma-separated quoted `STRING` values or as an expression resolving to a `STRING` or a `LIST<STRING>`.

[NOTE]
====
Expand Down
11 changes: 5 additions & 6 deletions modules/ROOT/pages/clauses/load-csv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ The CSV file to use with `LOAD CSV` must have the following characteristics:
* the end line termination is system dependent, e.g., it is `\n` on unix or `\r\n` on windows;
* the default field terminator is `,`;
* the field terminator character can be change by using the option `FIELDTERMINATOR` available in the `LOAD CSV` command;
* quoted strings are allowed in the CSV file and the quotes are dropped when reading the data;
* the character for string quotation is double quote `"`;
* quoted `STRING` values are allowed in the CSV file and the quotes are dropped when reading the data;
* the character for `STRING` quotation is double quote `"`;
* if `dbms.import.csv.legacy_quote_escaping` is set to the default value of `true`, `\` is used as an escape character;
* a double quote must be in a quoted string and escaped, either with the escape character or a second double quote.
* a double quote must be in a quoted `STRING` and escaped, either with the escape character or a second double quote.

[[load-csv-import-data-from-a-csv-file]]
== Import data from a CSV file
Expand Down Expand Up @@ -139,7 +139,7 @@ Labels added: 4

[[load-csv-import-data-from-a-csv-file-containing-headers]]
== Import data from a CSV file containing headers
When your CSV file has headers, you can view each row in the file as a map instead of as an array of strings.
When your CSV file has headers, you can view each row in the file as a map instead of as a `LIST<STRING>`.

.artists-with-headers.csv
[source, csv, role="noheaders", filename="artists-with-headers.csv"]
Expand Down Expand Up @@ -314,8 +314,7 @@ RETURN
size(a.name) AS size
----

Note that strings are wrapped in quotes in the output here.
You can see that when comparing to the length of the string in this case!
Note that the `STRING` values are wrapped in quotes in the output.

.Result
[role="queryresult",options="header,footer",cols="3*<m"]
Expand Down
26 changes: 13 additions & 13 deletions modules/ROOT/pages/clauses/transaction-clauses.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ a| The transaction ID. label:default-output[]
m| STRING

m| currentQueryId
a| The ID of the query currently executing in this transaction, or an empty string if no query is currently executing. label:default-output[]
a| The ID of the query currently executing in this transaction, or an empty `STRING` if no query is currently executing. label:default-output[]
m| STRING

m| connectionId
a| The ID of the database connection attached to the transaction or an empty string for embedded connections. label:default-output[]
a| The ID of the database connection attached to the transaction or an empty `STRING` for embedded connections. label:default-output[]
m| STRING

m| clientAddress
a| The client address of the connection issuing the transaction or an empty string if unavailable. label:default-output[]
a| The client address of the connection issuing the transaction or an empty `STRING` if unavailable. label:default-output[]
m| STRING

m| username
a| The username of the user executing the transaction. label:default-output[]
m| STRING

m| currentQuery
a| The query text of the query currently executing in this transaction, or an empty string if no query is currently executing. label:default-output[]
a| The query text of the query currently executing in this transaction, or an empty `STRING` if no query is currently executing. label:default-output[]
m| STRING

m| startTime
Expand All @@ -67,7 +67,7 @@ m| DURATION

m| outerTransactionId
a|
The ID of this transaction's outer transaction, if such exists, otherwise an empty string.
The ID of this transaction's outer transaction, if such exists, otherwise an empty `STRING`.
For details, see xref:subqueries/subqueries-in-transactions.adoc[`CALL { ... } IN TRANSACTIONS`].
m| STRING

Expand All @@ -81,12 +81,12 @@ m| MAP

m| planner
a|
The name of the Cypher planner used to plan the query currently executing in this transaction, or an empty string if no query is currently executing.
The name of the Cypher planner used to plan the query currently executing in this transaction, or an empty `STRING` if no query is currently executing.
For details, see xref::planning-and-tuning/query-tuning.adoc#cypher-planner[Cypher planner].
m| STRING

m| runtime
a| The name of the Cypher runtime used by the query currently executing in this transaction, or an empty string if no query is currently executing. For details, see xref::planning-and-tuning/runtimes/index.adoc[Cypher runtime].
a| The name of the Cypher runtime used by the query currently executing in this transaction, or an empty `STRING` if no query is currently executing. For details, see xref::planning-and-tuning/runtimes/index.adoc[Cypher runtime].
m| STRING

m| indexes
Expand All @@ -95,7 +95,7 @@ m| LIST<MAP>

// New in 5.0
m| currentQueryStartTime
a| The time at which the query currently executing in this transaction was started, or an empty string if no query is currently executing.
a| The time at which the query currently executing in this transaction was started, or an empty `STRING` if no query is currently executing.
m| STRING

m| protocol
Expand All @@ -111,11 +111,11 @@ m| STRING

// New in 5.0
m| currentQueryStatus
a| The current status of the query currently executing in this transaction (`parsing`, `planning`, `planned`, `running`, or `waiting`), or an empty string if no query is currently executing.
a| The current status of the query currently executing in this transaction (`parsing`, `planning`, `planned`, `running`, or `waiting`), or an empty `STRING` if no query is currently executing.
m| STRING

m| statusDetails
a| Provide additional status details from the underlying transaction or an empty string if none is available.
a| Provide additional status details from the underlying transaction or an empty `STRING` if none is available.
m| STRING

m| resourceInformation
Expand Down Expand Up @@ -195,7 +195,7 @@ a| The total number of page cache faults that the query currently executing in t
m| INTEGER

m| initializationStackTrace
a| The initialization stacktrace for this transaction, or an empty string if unavailable.
a| The initialization stacktrace for this transaction, or an empty `STRING` if unavailable.
m| STRING

|===
Expand All @@ -222,7 +222,7 @@ SHOW TRANSACTION[S] [transaction-id[,...]]
----

The format of `transaction-id` is `<databaseName>-transaction-<id>`.
Transaction IDs must be supplied as one or more comma-separated quoted strings or as an expression resolving to a string or a list of strings.
Transaction IDs must be supplied as one or more comma-separated quoted `STRING` values, or as an expression resolving to a `STRING` or a `LIST<STRING>`.

[NOTE]
====
Expand Down Expand Up @@ -388,7 +388,7 @@ TERMINATE TRANSACTION[S] transaction_id[, ...]
----

The format of `transaction-id` is `<databaseName>-transaction-<id>`.
Transaction IDs must be supplied as one or more comma-separated quoted strings or as an expression resolving to a string or a list of strings.
Transaction IDs must be supplied as one or more comma-separated quoted `STRING` values, or as an expression resolving to a `STRING` or a `LIST<STRING>`.

[NOTE]
====
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/use.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ MATCH (n) RETURN n
[[query-use-examples-query-composite-database-constituent-graph-dynamically]]
=== Query a composite database constituent graph dynamically

The built-in function `graph.byName()` can be used in the `USE` clause to resolve a constituent graph from a string value containing the qualified name of a constituent.
The built-in function `graph.byName()` can be used in the `USE` clause to resolve a constituent graph from a `STRING` value containing the qualified name of a constituent.

This example uses a composite database named `myComposite` that includes an alias named `myConstituent`:

Expand Down
22 changes: 11 additions & 11 deletions modules/ROOT/pages/clauses/where.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,18 @@ In this case, `name` is now the only variable in scope for the `RETURN` clause.


[[query-where-string]]
== String matching
== `STRING` matching

The prefix and suffix of a string can be matched using `STARTS WITH` and `ENDS WITH`.
To undertake a substring search (that is, match regardless of the location within a string), use `CONTAINS`.
The prefix and suffix of a `STRING` can be matched using `STARTS WITH` and `ENDS WITH`.
To undertake a substring search (that is, match regardless of the location within a `STRING`), use `CONTAINS`.

The matching is _case-sensitive_.
Attempting to use these operators on values which are not strings will return `null`.
Attempting to use these operators on values which are not `STRING` values will return `null`.

[[match-string-start]]
=== Prefix string search using `STARTS WITH`
=== Prefix `STRING` search using `STARTS WITH`

The `STARTS WITH` operator is used to perform case-sensitive matching on the beginning of a string:
The `STARTS WITH` operator is used to perform case-sensitive matching on the beginning of a `STRING`:

.Query
[source, cypher]
Expand All @@ -291,9 +291,9 @@ The `name` and `age` values for `Peter` are returned because his name starts wit


[[match-string-end]]
=== Suffix string search using `ENDS WITH`
=== Suffix `STRING` search using `ENDS WITH`

The `ENDS WITH` operator is used to perform case-sensitive matching on the ending of a string:
The `ENDS WITH` operator is used to perform case-sensitive matching on the ending of a `STRING`:

.Query
[source, cypher]
Expand All @@ -317,7 +317,7 @@ The `name` and `age` values for `Peter` are returned because his name ends with
[[match-string-contains]]
=== Substring search using `CONTAINS`

The `CONTAINS` operator is used to perform case-sensitive matching regardless of location within a string:
The `CONTAINS` operator is used to perform case-sensitive matching regardless of location within a `STRING`:

.Query
[source, cypher]
Expand All @@ -341,7 +341,7 @@ The `name` and `age` for `Peter` are are returned because his name contains "ete
[[match-string-negation]]
=== String matching negation

Use the `NOT` keyword to exclude all matches on given string from your result:
Use the `NOT` keyword to exclude all matches on given `STRING` from your result:

.Query
[source, cypher]
Expand All @@ -367,7 +367,7 @@ The `name` and `age` values `Peter` are returned because his name does not end w

Cypher supports filtering using regular expressions.
The regular expression syntax is inherited from the link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html[Java regular expressions].
This includes support for flags that change how strings are matched, including case-insensitive `(?i)`, multiline `(?m)`, and dotall `(?s)`.
This includes support for flags that change how `STRING` values are matched, including case-insensitive `(?i)`, multiline `(?m)`, and dotall `(?s)`.

Flags are given at the beginning of the regular expression.
For an example of a regular expression flag given at the beginning of a pattern, see the xref::clauses/where.adoc#case-insensitive-regular-expressions[case-insensitive regular expression] section.
Expand Down
14 changes: 7 additions & 7 deletions modules/ROOT/pages/constraints/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ CREATE CONSTRAINT movie_titles IF NOT EXISTS
FOR (movie:Movie) REQUIRE movie.title :: STRING
----

Assuming a node property type constraint on the label `Movie` which restricts the property `title` to string values already exists:
Assuming a node property type constraint on the label `Movie` which restricts the property `title` to `STRING` values already exists:

.Result
[queryresult]
Expand All @@ -1420,7 +1420,7 @@ Assuming a node property type constraint on the label `Movie` which restricts th
.+CREATE CONSTRAINT+
======

Create a node property type constraint restricting the property `title` to string values on nodes with the `Movie` label, when that constraint already exists:
Create a node property type constraint restricting the property `title` to `STRING` values on nodes with the `Movie` label, when that constraint already exists:

.Query
[source, cypher, role=test-fail]
Expand Down Expand Up @@ -1557,7 +1557,7 @@ Failed to create node property type constraint: Invalid property type `LIST<LIST
.+CREATE NODE+
======

Create an `Movie` node with a string `title` property:
Create an `Movie` node with a `STRING` `title` property:

.Query
[source, cypher]
Expand All @@ -1582,7 +1582,7 @@ Added 1 label, created 1 node, set 1 properties
.+CREATE NODE+
======

Create a `Movie` node with an integer `title` property, given a property type constraint on the label `Movie` restricting the `title` property to string values:
Create a `Movie` node with an integer `title` property, given a property type constraint on the label `Movie` restricting the `title` property to `STRING` values:

.Query
[source, cypher, role=test-fail]
Expand All @@ -1609,7 +1609,7 @@ Node(0) with label `Movie` has property `title` of wrong type `Long`. Allowed ty
.+CREATE CONSTRAINT+
======

Create a constraint restricting the property `franchise` to string values on nodes with the `Movie` label, when there already exists a node with a boolean `franchise` property:
Create a constraint restricting the property `franchise` to `STRING` values on nodes with the `Movie` label, when there already exists a node with a `BOOLEAN` `franchise` property:

////
[source, cypher, role=test-setup]
Expand Down Expand Up @@ -1985,7 +1985,7 @@ Set 1 property, created 1 relationship
.+CREATE RELATIONSHIP+
======

Create a `PART_OF` relationship with a string `order` property, given a property type constraint on the relationship type `PART_OF` restricting the `order` property to integer values:
Create a `PART_OF` relationship with a `STRING` `order` property, given a property type constraint on the relationship type `PART_OF` restricting the `order` property to integer values:

.Query
[source, cypher, role=test-fail]
Expand Down Expand Up @@ -2013,7 +2013,7 @@ Relationship(0) with type `PART_OF` has property `order` of wrong type `String`.
.+CREATE CONSTRAINT+
======

Create a constraint restricting the property `releaseOrder` to integer values on relationships with the `PART_OF` relationship type, when there already exists a relationship with a string `releaseOrder` property:
Create a constraint restricting the property `releaseOrder` to integer values on relationships with the `PART_OF` relationship type, when there already exists a relationship with a `STRING` `releaseOrder` property:

////
[source, cypher, role=test-setup]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ SHOW CONSTRAINTS
a|

Introduced `propertyType` column, which is returned by default.
It returns a string representation of the property type for property type constraints, and `null` for other constraints.
It returns a `STRING` representation of the property type for property type constraints, and `null` for other constraints.


|===
Expand Down Expand Up @@ -944,7 +944,7 @@ a|

List configuration settings on the current server.

The `setting-name` is either a comma-separated list of one or more quoted strings or a single expression resolving to a string or a list of strings.
The `setting-name` is either a comma-separated list of one or more quoted `STRING` values or a single expression resolving to a `STRING` or a `LIST<STRING>``.

a|
label:functionality[]
Expand Down Expand Up @@ -1363,7 +1363,7 @@ OPTIONS "{" btree-option: btree-value[, ...] "}"
a|
B-tree indexes are removed.

B-tree indexes used for string queries are replaced by:
B-tree indexes used for `STRING` predicates are replaced by:
[source, cypher, role="noheader"]
----
CREATE TEXT INDEX ...
Expand Down Expand Up @@ -1433,7 +1433,7 @@ Replaced by:
----
CREATE CONSTRAINT ...
----
Constraints used for string properties require an additional text index to cover the string queries properly.
Constraints used for `STRING` properties require an additional text index to cover the `STRING` predicates properly.
Constraints used for point properties require an additional point index to cover the spatial queries properly.

a|
Expand Down Expand Up @@ -1844,7 +1844,7 @@ SHOW TRANSACTIONS [transaction-id[,...]]
TERMINATE TRANSACTIONS transaction-id[,...]
----
a|
`transaction-id` now allows general expressions resolving to a string or a list of strings instead of just parameters.
`transaction-id` now allows general expressions resolving to a `STRING` or `LIST<STRING>` instead of just parameters.

a|
label:functionality[]
Expand Down Expand Up @@ -1875,8 +1875,8 @@ The query does not require a specific order and there can be zero or more of eac
When the command is not in standalone mode, the `YIELD` and `RETURN` clauses are mandatory.
`YIELD *` is not allowed.

`transaction-id` is a comma-separated list of one or more quoted strings.
It could also be an expression resolving to a string or a list of strings (for example the output column from `SHOW`).
`transaction-id` is a comma-separated list of one or more quoted `STRING` values.
It could also be an expression resolving to a `STRING` or a `LIST<STRING>` (for example the output column from `SHOW`).

a|
label:functionality[]
Expand Down Expand Up @@ -2642,7 +2642,7 @@ SHOW TRANSACTION[S] [transaction-id[,...]]
a|
List transactions on the current server.

The `transaction-id` is a comma-separated list of one or more quoted strings, a string parameter, or a list parameter.
The `transaction-id` is a comma-separated list of one or more quoted `STRING` values, a `STRING` parameter, or a list parameter.

This replaces the procedures `dbms.listTransactions` and `dbms.listQueries`.

Expand All @@ -2656,7 +2656,7 @@ TERMINATE TRANSACTION[S] transaction-id[,...]
a|
Terminate transactions on the current server.

The `transaction-id` is a comma-separated list of one or more quoted strings, a string parameter, or a list parameter.
The `transaction-id` is a comma-separated list of one or more quoted `STRING` values, a `STRING` parameter, or a list parameter.

This replaces the procedures `dbms.killTransaction`, `dbms.killTransactions`, `dbms.killQuery`, and `dbms.killQueries`.

Expand Down
Loading
Loading