@@ -55,7 +55,7 @@ implementation 'com.arangodb:arangodb-tinkerpop-provider:x.y.z'
55
55
To use the provider in the Gremlin Console, first you need to install it:
56
56
57
57
``` text
58
- :install com.arangodb arangodb-tinkerpop-provider 3.1.0-SNAPSHOT
58
+ :install com.arangodb arangodb-tinkerpop-provider x.y.z
59
59
```
60
60
61
61
Then, after restarting the console, you can use it:
@@ -73,10 +73,10 @@ gremlin> conf = [
73
73
==>gremlin.arangodb.conf.driver.password=test
74
74
75
75
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}}}]
77
77
78
78
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]
80
80
81
81
gremlin> g.addV("person").property("name", "marko")
82
82
==>v[4586117]
@@ -90,7 +90,7 @@ gremlin> g.V().hasLabel("person").values("name")
90
90
To use the provider as Gremlin Server plugin, first you need to install it:
91
91
92
92
``` 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
94
94
```
95
95
96
96
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
385
385
386
386
Existing graphs are never modified automatically.
387
387
388
- Collection names (vertex and edge collections) will be prefixed with the graph name if they aren't already.
389
-
390
388
# # Graph Types
391
389
392
390
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");
439
437
` ` `
440
438
[//] : <> (@formatter:on)
441
439
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`).
444
442
445
443
# ## COMPLEX Graph Type
446
444
@@ -451,7 +449,7 @@ edge definitions. It has the following advantages:
451
449
- It allows multiple vertex collections and multiple edge collections
452
450
- It partitions the data in a finer way
453
451
- 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
455
453
456
454
But on the other side has the following constraints :
457
455
@@ -484,18 +482,12 @@ graph.addVertex(T.label, "person", T.id, "person/foo");
484
482
` ` `
485
483
[//] : <> (@formatter:on)
486
484
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`).
489
487
490
488
# # Naming Constraints
491
489
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.
499
491
500
492
# # Persistent Structure
501
493
@@ -504,8 +496,8 @@ The ArangoDB TinkerPop Provider maps TinkerPop data structures to ArangoDB data
504
496
# ## Vertices
505
497
506
498
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>` .
509
501
510
502
Each vertex document contains :
511
503
@@ -530,7 +522,7 @@ creates a document like this:
530
522
` ` ` json
531
523
{
532
524
"_key": "4856",
533
- "_id": "tinkerpop_vertex /4856",
525
+ "_id": "vertex /4856",
534
526
"_rev": "_kFqmbXK---",
535
527
"_label": "person",
536
528
"name": "Freddie Mercury",
@@ -545,7 +537,7 @@ creates a document like this:
545
537
# ## Edges
546
538
547
539
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>`.
549
541
550
542
Each edge document contains :
551
543
@@ -568,9 +560,9 @@ creates a document like this:
568
560
` ` ` json
569
561
{
570
562
"_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",
574
566
"_rev": "_kFq20-u---",
575
567
"_label": "knows",
576
568
"since": 1970
@@ -598,7 +590,7 @@ For complex queries or performance-critical operations, you can use ArangoDB's n
598
590
[//] : <> (@formatter:off)
599
591
` ` ` java
600
592
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"))
602
594
.toList();
603
595
604
596
// Query using document ID
0 commit comments