Compatibility of GDB Cypher
This topic describes the compatibility of the Graph Database (GDB) Cypher implementation.
Protocol version
GDB supports the bolt-v3 protocol. We recommend using version 4.0.0 of the neo4j-java-driver. Set the GDB domain name to bolt://gdb-endpoint:gdb-port. All other settings are the same as those for native Cypher.
Data types
GDB Cypher supports basic data types such as integers, floating-point numbers, strings, and Boolean values. It also supports the Point spatial coordinate type. The following table provides an overview.
Category | Type | Support status |
|---|---|---|
Property types | Number / String / Boolean / Spatial / Temporal | Temporal is not supported |
Structural types | Nodes / Relationships / Paths | Support |
Composite types | Lists / Maps | Support |
The following types are not supported or are not fully compatible:
The temporal type is not supported.
GDB supports the Point spatial coordinate type. However, you cannot use the Point type as a property for points or edges.
The List type.
The List type can be used as a property value only for points, not for edges. When you use a List as a property, GDB processes it as a Set. This means that duplicate values in the list are stored only once. You can use an element in the list as a condition for an indexed search. For example:
neo4j> create (n:X {p: [1,2,1]}) return n;
+------------------+
| n |
+------------------+
| (:X {p: [1, 2]}) |
+------------------+Clauses
Operation | Support status | Notes |
|---|---|---|
MATCH | Support | None |
OPTIONAL MATCH | Support | None |
RETURN | Support | None |
WITH | Yes | None |
UNWIND | Yes | None |
WHERE | Support | None |
ORDER BY | Support | None |
SKIP | Support | None |
LIMIT | Support | None |
CREATE | Yes | None |
DELETE | Support | None |
SET | Support | GDB does not support label modification or multiple labels. Note
|
REMOVE | Supported | This is a property operation. Deleting labels is not supported. |
FOREACH | Supported | None |
MERGE | Support | None |
CALL {subquery} | No | This clause was introduced in Cypher 4.0 and is not supported by GDB. |
CALL procedure | No | Support depends on the procedure implementation. |
UNION | Support | None |
USE | No | GDB does not support multiple graphs, which were introduced in Cypher 4.0. |
LOAD CSV | No | GDB supports data import from sources such as OSS and DataWorks. |
Built-in functions
The following table describes GDB's support for Cypher built-in functions.
Function | Category | Support status |
|---|---|---|
all() | Predicate | No |
any() | Predicate | No |
exists() | Predicate | Yes |
single() | Predicate | No |
none() | Predicate | Yes |
coalesce() | Scalar | Yes |
endNode() | Scalar | Yes |
head() | Scalar | Yes |
id() | Scalar | Yes |
last() | Scalar | Yes |
length() | Scalar | Yes |
randomUUID() | Scalar | No |
properties() | Scalar | Yes |
size() | Scalar | Yes |
startNode() | Scalar | Yes |
timestamp() | Scalar | No |
toBoolean() | Scalar | Yes |
toFloat() | Scalar | Yes |
toInteger() | Scalar | Yes |
type() | Scalar | Yes |
avg() | Aggregation | Yes |
collect() | Aggregation | Yes |
count() | Aggregation | Yes |
max() | Aggregation | Partially supported |
min() | Aggregation | Partially supported |
percentileCont() | Aggregation | Partially supported |
percentileDisc() | Aggregation | Partially supported |
stDev() | Aggregation | No |
stDevP() | Aggregation | No |
sum() | Aggregation | Support |
keys() | List | Support |
labels() | List | Support |
nodes() | List | Support |
range() | List | Support |
reduce() | List | Support |
relationships() | List | Support |
reverse() | List | Support |
tail() | List | Support |
left() | String | No |
lTrim() | String | No |
reverse() | String | Support |
right() | String | No |
rTrim() | String | No |
split() | String | Support |
subString() | String | Support |
toLower() | String | Yes |
toString() | String | Support |
toUpper() | String | Yes |
trim() | String | Yes |
abs() | Numeric | Support |
ceil() | Numeric | No |
floor() | Numeric | No |
rand() | Numeric | No |
round() | Numeric | Support |
sign() | Numeric | No |
e() | Logarithmic | No |
exp() | Logarithmic function | No |
log() | Logarithmic function | No |
log10() | Logarithmic function | No |
sqrt() | logarithmic function | Support |
acos() | Trigonometric functions | No |
atan() | Trigonometric functions | No |
atan2() | Trigonometric functions | No |
cos() | Trigonometric function | No |
cot() | Trigonometric function | No |
degrees() | Trigonometric function | No |
haversin() | Trigonometric function | No |
pi() | Trigonometric functions | No |
radians() | Trigonometric function | No |
sin() | Trigonometric functions | No |
tan() | Trigonometric functions | No |
point() | Space | Support |
distance() | Spatial | Yes |
The max(), min(), percentileCount(), and percentileDisc() functions support only lists where all input parameters are of the same type. Lists with mixed types or NULL values are not supported.
GDB does not support temporal types. Therefore, time-related functions are not listed in the table.
Partially compatible usages
LOAD CSV: GDB does not support the LOAD CSV clause or the related
linenumber()andfile()functions because GDB provides other data import methods.Indexing mechanism: GDB automatically creates an auto index for all properties. You can also use API operations to set composite indexes and vertex-centric indexes. Creating an index using Cypher is not supported.
Bookmarks: Bookmarks are not supported.
User-defined functions: GDB does not support user-defined functions (UDFs) or APOC.
Drivers: You can use official drivers in languages such as Java, Python, Go, JavaScript, and C# to access GDB. You can also access GDB through Spring.
Management features: Other management-related features in Cypher, such as creating and deleting databases, managing indexes, and setting property constraints and access controls, are handled using a method that is compatible with Gremlin access.
Transaction support
Transactions in Simple and Async Session modes are supported. Reactive Session mode is not currently supported.
Session mode | Atomic Transaction | Transaction Function |
|---|---|---|
Simple Sessions | Support | Support |
Async Sessions | Support | Support |
Reactive Sessions | No | No |
Spring support
GDB can be accessed through Spring. The support status for Spring access interfaces is as follows:
Default spring-data-neo4j function | Support status |
|---|---|
S save(S entity); | Yes |
Iterable | Support |
Optional | Support |
boolean existsById(ID id); | Supported |
Iterable | Supported |
Iterable | Support |
long count(); | Supported |
void deleteById(ID id); | Support |
void delete(T entity); | Support |
void deleteAll(Iterable<? extends T> entities); | Support |
void deleteAll(); | Supported |
Iterable | Support |
Page | Supported |
S extends T> S save(S s, int depth); | Support |
<S extends T> Iterable<S> save(Iterable<S> entities, int depth); | Support |
Optional | Supported |
Iterable | Supported |
Iterable | Supported |
Iterable | Supported |
Iterable | Support |
Iterable | Support |
Page | Supported |
Visualization
This feature is available through an open source client and will be integrated into the GDB DMS system in a future release.