Skip to content

Commit 96e0cb4

Browse files
committed
update: create_graph
1 parent 0f46b50 commit 96e0cb4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

arango/database.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,7 @@ def create_graph(
16971697
shard_count: Optional[int] = None,
16981698
replication_factor: Optional[int] = None,
16991699
write_concern: Optional[int] = None,
1700+
satellite_collections: Optional[Sequence[str]] = None,
17001701
) -> Result[Graph]:
17011702
"""Create a new graph.
17021703
@@ -1721,7 +1722,8 @@ def create_graph(
17211722
:param smart_field: Document field used to shard the vertices of the
17221723
graph. To use this, parameter **smart** must be set to True and
17231724
every vertex in the graph must have the smart field. Applies only
1724-
to enterprise version of ArangoDB.
1725+
to enterprise version of ArangoDB. NOTE: If this field is
1726+
None and **smart** is True, an Enterprise Graph will be created.
17251727
:type smart_field: str | None
17261728
:param shard_count: Number of shards used for every collection in the
17271729
graph. To use this, parameter **smart** must be set to True and
@@ -1744,6 +1746,12 @@ def create_graph(
17441746
parameter cannot be larger than that of **replication_factor**.
17451747
Default value is 1. Used for clusters only.
17461748
:type write_concern: int
1749+
:param satellite_collections: An array of collection names that is
1750+
used to create SatelliteCollections for a (Disjoint) SmartGraph
1751+
using SatelliteCollections (Enterprise Edition only). Each array
1752+
element must be a string and a valid collection name. The
1753+
collection type cannot be modified later.
1754+
:type satellite_collections: [str] | None
17471755
:return: Graph API wrapper.
17481756
:rtype: arango.graph.Graph
17491757
:raise arango.exceptions.GraphCreateError: If create fails.
@@ -1784,6 +1792,8 @@ def create_graph(
17841792
data["options"]["replicationFactor"] = replication_factor
17851793
if write_concern is not None: # pragma: no cover
17861794
data["options"]["writeConcern"] = write_concern
1795+
if satellite_collections is not None: # pragma: no cover
1796+
data["options"]["satellites"] = satellite_collections
17871797

17881798
request = Request(method="post", endpoint="/_api/gharial", data=data)
17891799

0 commit comments

Comments
 (0)