Skip to content

Commit d059963

Browse files
committed
updated documentation
1 parent 21098f0 commit d059963

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
- removed the restriction of prefixing collection names with graph name (#18, DE-1069)
10+
- fixed id prefix check in graphs of type `COMPLEX` (#17, DE-1068)
11+
- removed `_label` field from document structure in graphs of type `COMPLEX` (#15)
12+
- updated tinkerpop version to 3.7.4 (#16)
13+
914
## [3.0.1] - 2025-08-06
1015

1116
- fixed deserialization of `null` values in AQL results

README.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ implementation 'com.arangodb:arangodb-tinkerpop-provider:x.y.z'
5555
To use the provider in the Gremlin Console, first you need to install it:
5656

5757
```text
58-
:install com.arangodb arangodb-tinkerpop-provider 3.1.0-SNAPSHOT
58+
:install com.arangodb arangodb-tinkerpop-provider x.y.z
5959
```
6060

6161
Then, after restarting the console, you can use it:
@@ -73,10 +73,10 @@ gremlin> conf = [
7373
==>gremlin.arangodb.conf.driver.password=test
7474
7575
gremlin> graph = GraphFactory.open(conf)
76-
==>arangodbgraph[ArangoDBGraphConfig{dbName='_system', graphName='tinkerpop', graphType=SIMPLE, vertices=[tinkerpop_vertex], edges=[tinkerpop_edge], edgeDefinitions=[tinkerpop_edge:[tinkerpop_vertex]->[tinkerpop_vertex]], orphanCollections=[], driverConfig=ArangoConfigPropertiesImpl{prefix='', properties={password=test, hosts=172.28.0.1:8529}}}]
76+
==>arangodbgraph[ArangoDBGraphConfig{dbName='_system', graphName='tinkerpop', graphType=SIMPLE, vertices=[vertex], edges=[edge], edgeDefinitions=[edge:[vertex]->[vertex]], orphanCollections=[], driverConfig=ArangoConfigPropertiesImpl{properties={password=test, hosts=172.28.0.1:8529}}}]
7777
7878
gremlin> g = graph.traversal()
79-
==>graphtraversalsource[arangodbgraph[ArangoDBGraphConfig{dbName='_system', graphName='tinkerpop', graphType=SIMPLE, vertices=[tinkerpop_vertex], edges=[tinkerpop_edge], edgeDefinitions=[tinkerpop_edge:[tinkerpop_vertex]->[tinkerpop_vertex]], orphanCollections=[], driverConfig=ArangoConfigPropertiesImpl{prefix='', properties={password=test, hosts=172.28.0.1:8529}}}], standard]
79+
==>graphtraversalsource[arangodbgraph[ArangoDBGraphConfig{dbName='_system', graphName='tinkerpop', graphType=SIMPLE, vertices=[vertex], edges=[edge], edgeDefinitions=[edge:[vertex]->[vertex]], orphanCollections=[], driverConfig=ArangoConfigPropertiesImpl{properties={password=test, hosts=172.28.0.1:8529}}}], standard]
8080
8181
gremlin> g.addV("person").property("name", "marko")
8282
==>v[4586117]
@@ -90,7 +90,7 @@ gremlin> g.V().hasLabel("person").values("name")
9090
To use the provider as Gremlin Server plugin, first you need to install it:
9191

9292
```text
93-
./bin/gremlin-server.sh install com.arangodb arangodb-tinkerpop-provider 3.1.0-SNAPSHOT
93+
./bin/gremlin-server.sh install com.arangodb arangodb-tinkerpop-provider x.y.z
9494
```
9595

9696
Then, you need to create the graph configuration, e.g. in the file
@@ -385,8 +385,6 @@ definitions, set `gremlin.arangodb.conf.graph.enableDataDefinition` to `true`. T
385385

386386
Existing graphs are never modified automatically.
387387

388-
Collection names (vertex and edge collections) will be prefixed with the graph name if they aren't already.
389-
390388
## Graph Types
391389

392390
The ArangoDB TinkerPop Provider supports two graph types, which can be configured with the property
@@ -439,8 +437,8 @@ graph.addVertex(T.label, "person", T.id, "foo");
439437
```
440438
[//]: <> (@formatter:on)
441439

442-
would result in creating a document in the vertex collection `myGraph_v` with `_key` equals to `foo` (and `_id` equals
443-
to `myGraph_v/foo`).
440+
would result in creating a document in the vertex collection `v` with `_key` equals to `foo` (and `_id` equals
441+
to `v/foo`).
444442

445443
### COMPLEX Graph Type
446444

@@ -451,7 +449,7 @@ edge definitions. It has the following advantages:
451449
- It allows multiple vertex collections and multiple edge collections
452450
- It partitions the data in a finer way
453451
- It allows indexing and sharding collections independently
454-
- It can match pre-existing database graph structures
452+
- It is more flexible to match pre-existing database graph structures
455453

456454
But on the other side has the following constraints:
457455

@@ -484,18 +482,12 @@ graph.addVertex(T.label, "person", T.id, "person/foo");
484482
```
485483
[//]: <> (@formatter:on)
486484

487-
would result in creating a document in the vertex collection `myGraph_person` with `_key` equals to `foo` (and `_id`
488-
equals to `myGraph_person/foo`).
485+
would result in creating a document in the vertex collection `person` with `_key` equals to `foo` (and `_id`
486+
equals to `person/foo`).
489487

490488
## Naming Constraints
491489

492-
When using the ArangoDB TinkerPop Provider, be aware of these naming constraints:
493-
494-
- Element IDs must be strings
495-
- The underscore character (`_`) is used as a separator for collection names (e.g., `myGraph_myCol`). Therefore, it
496-
cannot be used in:
497-
- Graph name (`gremlin.arangodb.conf.graph.name`)
498-
- Labels
490+
When using the ArangoDB TinkerPop Provider, be aware that Element IDs must be strings.
499491

500492
## Persistent Structure
501493

@@ -504,8 +496,8 @@ The ArangoDB TinkerPop Provider maps TinkerPop data structures to ArangoDB data
504496
### Vertices
505497

506498
Vertices are stored as documents in vertex collections. In a `SIMPLE` graph, all vertices are stored in a single
507-
collection, by default named `<graphName>_vertex`. In a `COMPLEX` graph, vertices are stored in collections named
508-
`<graphName>_<label>`.
499+
collection, by default named `vertex`. In a `COMPLEX` graph, vertices are stored in collections named
500+
`<label>`.
509501

510502
Each vertex document contains:
511503

@@ -530,7 +522,7 @@ creates a document like this:
530522
```json
531523
{
532524
"_key": "4856",
533-
"_id": "tinkerpop_vertex/4856",
525+
"_id": "vertex/4856",
534526
"_rev": "_kFqmbXK---",
535527
"_label": "person",
536528
"name": "Freddie Mercury",
@@ -545,7 +537,7 @@ creates a document like this:
545537
### Edges
546538

547539
Edges are stored as documents in edge collections. In a `SIMPLE` graph, all edges are stored in a single collection, by
548-
default named `<graphName>_edge`. In a `COMPLEX` graph, edges are stored in collections named `<graphName>_<label>`.
540+
default named `edge`. In a `COMPLEX` graph, edges are stored in collections named `<label>`.
549541

550542
Each edge document contains:
551543

@@ -568,9 +560,9 @@ creates a document like this:
568560
```json
569561
{
570562
"_key": "5338",
571-
"_id": "tinkerpop_edge/5338",
572-
"_from": "tinkerpop_vertex/5335",
573-
"_to": "tinkerpop_vertex/5335",
563+
"_id": "edge/5338",
564+
"_from": "vertex/5335",
565+
"_to": "vertex/5335",
574566
"_rev": "_kFq20-u---",
575567
"_label": "knows",
576568
"since": 1970
@@ -598,7 +590,7 @@ For complex queries or performance-critical operations, you can use ArangoDB's n
598590
[//]: <> (@formatter:off)
599591
```java
600592
List<Vertex> alice = graph
601-
.<Vertex>aql("FOR v IN graph_vertex FILTER v.name == @name RETURN v", Map.of("name", "Alice"))
593+
.<Vertex>aql("FOR v IN vertex FILTER v.name == @name RETURN v", Map.of("name", "Alice"))
602594
.toList();
603595
604596
// Query using document ID

0 commit comments

Comments
 (0)