Skip to content

Commit 53fd1ab

Browse files
authored
Merge pull request #71 from arangodb/smart-attributes
Added IsSmart, SmartGraphAttribute attributes to CreateCollectionOptions
2 parents 333b862 + e76a814 commit 53fd1ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

collection_impl.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ func (c *collection) Remove(ctx context.Context) error {
237237
if err != nil {
238238
return WithStack(err)
239239
}
240+
applyContextSettings(ctx, req)
240241
resp, err := c.conn.Do(ctx, req)
241242
if err != nil {
242243
return WithStack(err)

database_collections.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ type CreateCollectionOptions struct {
8888
KeyOptions *CollectionKeyOptions `json:"keyOptions,omitempty"`
8989
// This field is used for internal purposes only. DO NOT USE.
9090
DistributeShardsLike string `json:"distributeShardsLike,omitempty"`
91+
// Set to create a smart edge or vertex collection.
92+
// This requires ArangoDB enterprise.
93+
IsSmart bool `json:"isSmart,omitempty"`
94+
// This field must be set to the attribute that will be used for sharding or smart graphs.
95+
// All vertices are required to have this attribute set. Edges derive the attribute from their connected vertices.
96+
// This requires ArangoDB enterprise.
97+
SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
9198
}
9299

93100
// CollectionType is the type of a collection.

0 commit comments

Comments
 (0)