-
-
Notifications
You must be signed in to change notification settings - Fork 16
Differences
There are a few important considerations/limitations of the ArangoDB implementation of the TinkerPop implementation.
The following are a list of the implementation details.
Tinkerpop works on the premise of list cardinallity for VertexProperties, i.e. the following gremlin program is expected to add two entries to the name property:
g.addV().property('name','marko').property('name','okram').next()
This can conflict with the expectation of attributes bein single (e.g. for reusing existing databases). For this reason, you need to specify the single cardinality if you want single value VertexProperties:
g.addV().property(single, 'name','marko').next()
ArandoDB Tinkerpop uses the ArangoDB Java driver for all db operations. Since the ArangoDB Java driver does nor support transactins, the ArandoDB Tinkerpop provider does not support them either. As a result all, operations that modify the graph are executed atomically.
ArandoDB Tinkerpop Vertex and Edge IDs must be of type String. If you don't supply an ID when you add a vertex or an edge, the ArangoDB id generation mechanism is used.
When providing an ID, it must adhere to the ArangoDB ID restrictions.
In Gremlin, tt is possible to retreive a particular element by id:
g.addV().property(T.id, "1")
v1 = g.V("1")
However, implementation wise, in ArangoDB we are only allowed to manipulate the document's key, not its id. For this reason, providing a TinkerPop vertex id (T.id) actually sets the vertex's ArangoDB key. As a result, retrieving the vertex by the given id will fail:
Vertex v2 = g.V("1");
assert v2 == null;
Since we know that documents IDs are created by concatenating (with a slash) the document's collection and its key, then we can find the vertex like so:
Vertex v2 = g.V("person/1");
assert v2 == v1;
Eacn Tinkerpop OLTP implementation can specify what Graphs Features it supports. This is the list of the ArangoDB Tinkerpop Supported Features:
GraphFeatures | Enabled |
---|---|
Computer | false |
Persistence | true |
ConcurrentAccess | true |
Transactions | false |
ThreadedTransactions | false |
VariableFeatures | Enabled |
---|---|
Variables | true |
BooleanValues | true |
ByteValues | true |
DoubleValues | true |
FloatValues | true |
IntegerValues | true |
LongValues | true |
MapValues | true |
MixedListValues | true |
SerializableValues | true |
StringValues | true |
UniformListValues | true |
BooleanArrayValues | true |
ByteArrayValues | true |
DoubleArrayValues | true |
FloatArrayValues | true |
IntegerArrayValues | true |
LongArrayValues | true |
StringArrayValues | true |
VertexFeatures | Enabled |
---|---|
AddVertices | true |
RemoveVertices | true |
MultiProperties | true |
DuplicateMultiProperties | true |
MetaProperties | true |
AddProperty | true |
RemoveProperty | true |
UserSuppliedIds | true |
NumericIds | false |
StringIds | true |
UuidIds | false |
CustomIds | false |
AnyIds | false |
VertexPropertyFeatures | Enabled |
---|---|
RemoveProperty | true |
UserSuppliedIds | true |
NumericIds | false |
StringIds | true |
UuidIds | false |
CustomIds | false |
AnyIds | false |
Properties | true |
BooleanValues | true |
ByteValues | true |
DoubleValues | true |
FloatValues | true |
IntegerValues | true |
LongValues | true |
MapValues | true |
MixedListValues | true |
SerializableValues | true |
StringValues | true |
UniformListValues | true |
BooleanArrayValues | true |
ByteArrayValues | true |
DoubleArrayValues | true |
FloatArrayValues | true |
IntegerArrayValues | true |
LongArrayValues | true |
StringArrayValues | true |
EdgeFeatures | Enabled |
---|---|
AddEdges | true |
RemoveEdges | true |
AddProperty | true |
RemoveProperty | true |
UserSuppliedIds | true |
NumericIds | false |
StringIds | true |
UuidIds | false |
CustomIds | false |
AnyIds | false |
EdgePropertyFeatures | Enabled |
---|---|
Properties | true |
BooleanValues | true |
ByteValues | true |
DoubleValues | true |
FloatValues | true |
IntegerValues | true |
LongValues | true |
MapValues | true |
MixedListValues | true |
SerializableValues | true |
StringValues | true |
UniformListValues | true |
BooleanArrayValues | true |
ByteArrayValues | true |
DoubleArrayValues | true |
FloatArrayValues | true |
IntegerArrayValues | true |
LongArrayValues | true |
StringArrayValues | true |