You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Cosmos DB has [system properties](/rest/api/cosmos-db/databases) such as `_ts`, `_self`, `_attachments`, `_rid`, and `_etag` on every document. Additionally, Gremlin engine adds `inVPartition` and `outVPartition` properties on edges. By default, these properties are available for traversal. However, it's possible to include specific properties, or all of them, in Gremlin traversal.
18
+
Azure Cosmos DB for Gremlin has [system properties](/rest/api/cosmos-db/databases) such as `_ts`, `_self`, `_attachments`, `_rid`, and `_etag` on every item. Additionally, Gremlin engine adds `inVPartition` and `outVPartition` properties on edges. By default, these properties are available for traversal. However, it's possible to include specific properties, or all of them, in Gremlin traversal.
This property is used for optimistic concurrency control. If application needs to break operation into a few separate traversals, it can use eTag property to avoid data loss in concurrent writes.
26
+
This property is used for optimistic concurrency control. If an application needs to break an operation into separate traversals, use the eTag property to avoid data loss in concurrent writes.
If collection has document expiration enabled and documents have `ttl` property set on them, then this property is available in Gremlin traversal as a regular vertex or edge property. `ProjectionStrategy` isn't necessary to enable time-to-live property exposure.
34
+
If a graph has document expiration enabled and documents have `ttl` property set on them, then this property is available in Gremlin traversal as a regular vertex or edge property. `ProjectionStrategy` isn't necessary to enable time-to-live property exposure.
35
35
36
-
* Use the following command to set time-to-live on a new vertex:
36
+
- Use the following command to set time-to-live on a new vertex:
37
37
38
-
`console
39
-
g.addV(<ID>).property('ttl', <expirationTime>)
40
-
`
38
+
```gremlin
39
+
g.addV(<ID>).property('ttl', <expirationTime>)
40
+
```
41
41
42
-
For example, a vertex created with the following traversal is automatically deleted after *123 seconds*:
42
+
For example, a vertex created with the following traversal is automatically deleted after *123 seconds*:
43
43
44
-
`console
45
-
g.addV('vertex-one').property('ttl', 123)
46
-
`
44
+
```gremlin
45
+
g.addV('vertex-one').property('ttl', 123)
46
+
```
47
47
48
-
* Use the following command to set time-to-live on an existing vertex:
48
+
- Use the following command to set time-to-live on an existing vertex:
* Applying time-to-live property on vertices doesn't automatically apply it to edges. Because edges are independent records in the database store. Use the following command to set time-to-live on vertices and all the incoming and outgoing edges of the vertex:
54
+
- Applying the time-to-live property on vertices doesn't automatically apply it to associated edges. This behavior occurs because edges are independent records in the database store. Use the following command to set time-to-live on vertices and all the incoming and outgoing edges of the vertex:
You can set time to Live (TTL) on the container to -1 or set it to **On (no default)** from Azure portal, then the TTL is infinite for any item unless the item has TTL value explicitly set.
60
+
> [!NOTE]
61
+
> You can set time to Live (TTL) on the container to `-1` or to **On (no default)** from the Azure portal. Then, the TTL is infinite for any item unless the item has a TTL value explicitly set.
0 commit comments