Skip to content

Commit c6975bd

Browse files
Simran-Benikon
andauthored
Fix spelling and remove obsolete code comments (#671)
* Fix spelling of some Enterprise Edition features * Remove leftover comments from v1 driver WithReturnNew, WithWaitForSync, etc. are not used in the v2 driver, you use the ...WithOptions variants of functions and set options there (or pass references to variables) --------- Co-authored-by: enikon <[email protected]>
1 parent 86d83c8 commit c6975bd

10 files changed

+35
-41
lines changed

v2/arangodb/collection_documents_create.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ type CollectionDocumentCreate interface {
3636
// If the document data already contains a `_key` field, this will be used as key of the new document,
3737
// otherwise a unique key is created.
3838
// A ConflictError is returned when a `_key` field contains a duplicate key, other any other field violates an index constraint.
39-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
39+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4040
CreateDocument(ctx context.Context, document interface{}) (CollectionDocumentCreateResponse, error)
4141

4242
// CreateDocumentWithOptions creates a single document in the collection.
4343
// The document data is loaded from the given document, the document metadata is returned.
4444
// If the document data already contains a `_key` field, this will be used as key of the new document,
4545
// otherwise a unique key is created.
4646
// A ConflictError is returned when a `_key` field contains a duplicate key, other any other field violates an index constraint.
47-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
47+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4848
CreateDocumentWithOptions(ctx context.Context, document interface{}, options *CollectionDocumentCreateOptions) (CollectionDocumentCreateResponse, error)
4949

5050
// CreateDocuments creates multiple documents in the collection.
@@ -53,11 +53,8 @@ type CollectionDocumentCreate interface {
5353
// otherwise a unique key is created.
5454
// If a documents element contains a `_key` field with a duplicate key, other any other field violates an index constraint,
5555
// a ConflictError is returned in its indeed in the errors slice.
56-
// To return the NEW documents, prepare a context with `WithReturnNew`. The data argument passed to `WithReturnNew` must be
57-
// a slice with the same number of entries as the `documents` slice.
58-
// To wait until document has been synced to disk, prepare a context with `WithWaitForSync`.
5956
// If the create request itself fails or one of the arguments is invalid, an error is returned.
60-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
57+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
6158
CreateDocuments(ctx context.Context, documents interface{}) (CollectionDocumentCreateResponseReader, error)
6259

6360
// CreateDocumentsWithOptions creates multiple documents in the collection.
@@ -66,11 +63,8 @@ type CollectionDocumentCreate interface {
6663
// otherwise a unique key is created.
6764
// If a documents element contains a `_key` field with a duplicate key, other any other field violates an index constraint,
6865
// a ConflictError is returned in its indeed in the errors slice.
69-
// To return the NEW documents, prepare a context with `WithReturnNew`. The data argument passed to `WithReturnNew` must be
70-
// a slice with the same number of entries as the `documents` slice.
71-
// To wait until document has been synced to disk, prepare a context with `WithWaitForSync`.
7266
// If the create request itself fails or one of the arguments is invalid, an error is returned.
73-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
67+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
7468
CreateDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentCreateOptions) (CollectionDocumentCreateResponseReader, error)
7569
}
7670

v2/arangodb/collection_documents_delete.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@ type CollectionDocumentDelete interface {
3333
// DeleteDocument removes a single document with given key from the collection.
3434
// The document metadata is returned.
3535
// If no document exists with given key, a NotFoundError is returned.
36-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
36+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
3737
DeleteDocument(ctx context.Context, key string) (CollectionDocumentDeleteResponse, error)
3838

3939
// DeleteDocumentWithOptions removes a single document with given key from the collection.
4040
// The document metadata is returned.
4141
// If no document exists with given key, a NotFoundError is returned.
42-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
42+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4343
DeleteDocumentWithOptions(ctx context.Context, key string, opts *CollectionDocumentDeleteOptions) (CollectionDocumentDeleteResponse, error)
4444

4545
// DeleteDocuments removes multiple documents with given keys from the collection.
4646
// The document metadata are returned.
4747
// If no document exists with a given key, a NotFoundError is returned at its errors index.
48-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
48+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4949
DeleteDocuments(ctx context.Context, keys []string) (CollectionDocumentDeleteResponseReader, error)
5050

5151
// DeleteDocumentsWithOptions removes multiple documents with given keys from the collection.
5252
// The document metadata are returned.
5353
// If no document exists with a given key, a NotFoundError is returned at its errors index.
5454
// 'documents' must be a slice of structs with a `_key` field or a slice of keys.
55-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
55+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
5656
DeleteDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentDeleteOptions) (CollectionDocumentDeleteResponseReader, error)
5757
}
5858

v2/arangodb/collection_documents_read.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ type CollectionDocumentRead interface {
3333
// ReadDocument reads a single document with given key from the collection.
3434
// The document data is stored into result, the document metadata is returned.
3535
// If no document exists with given key, a NotFoundError is returned.
36-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
36+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
3737
ReadDocument(ctx context.Context, key string, result interface{}) (DocumentMeta, error)
3838

3939
// ReadDocumentWithOptions reads a single document with given key from the collection.
4040
// The document data is stored into result, the document metadata is returned.
4141
// If no document exists with given key, a NotFoundError is returned.
42-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
42+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4343
ReadDocumentWithOptions(ctx context.Context, key string, result interface{}, opts *CollectionDocumentReadOptions) (DocumentMeta, error)
4444

4545
// ReadDocuments reads multiple documents with given keys from the collection.
4646
// The documents data is stored into elements of the given results slice,
4747
// the documents metadata is returned.
4848
// If no document exists with a given key, a NotFoundError is returned at its errors index.
49-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
49+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
5050
ReadDocuments(ctx context.Context, keys []string) (CollectionDocumentReadResponseReader, error)
5151

5252
// ReadDocumentsWithOptions reads multiple documents with given keys from the collection.
5353
// The documents data is stored into elements of the given results slice and the documents metadata is returned.
5454
// If no document exists with a given key, a NotFoundError is returned at its errors index.
5555
// 'documents' must be a slice of structs with a `_key` field or a slice of keys.
56-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
56+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
5757
ReadDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentReadOptions) (CollectionDocumentReadResponseReader, error)
5858
}
5959

v2/arangodb/collection_documents_replace.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,29 @@ type CollectionDocumentReplace interface {
3434
// ReplaceDocument replaces a single document with given key in the collection.
3535
// If no document exists with given key, a NotFoundError is returned.
3636
// If `_id` field is present in the document body, it is always ignored.
37-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
37+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
3838
ReplaceDocument(ctx context.Context, key string, document interface{}) (CollectionDocumentReplaceResponse, error)
3939

4040
// ReplaceDocumentWithOptions replaces a single document with given key in the collection.
4141
// If no document exists with given key, a NotFoundError is returned.
4242
// If `_id` field is present in the document body, it is always ignored.
43-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
43+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4444
ReplaceDocumentWithOptions(ctx context.Context, key string, document interface{}, options *CollectionDocumentReplaceOptions) (CollectionDocumentReplaceResponse, error)
4545

4646
// ReplaceDocuments replaces multiple document with given keys in the collection.
4747
// The replaces are loaded from the given replaces slice, the documents metadata are returned.
4848
// If no document exists with a given key, a NotFoundError is returned at its errors index.
4949
// Each element in the replaces slice must contain a `_key` field.
5050
// If `_id` field is present in the document body, it is always ignored.
51-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
51+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
5252
ReplaceDocuments(ctx context.Context, documents interface{}) (CollectionDocumentReplaceResponseReader, error)
5353

5454
// ReplaceDocumentsWithOptions replaces multiple document with given keys in the collection.
5555
// The replaces are loaded from the given replaces slice, the documents metadata are returned.
5656
// If no document exists with a given key, a NotFoundError is returned at its errors index.
5757
// Each element in the replaces slice must contain a `_key` field.
5858
// If `_id` field is present in the document body, it is always ignored.
59-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
59+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
6060
ReplaceDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentReplaceOptions) (CollectionDocumentReplaceResponseReader, error)
6161
}
6262

v2/arangodb/collection_documents_update.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@ type CollectionDocumentUpdate interface {
3434
// The document metadata is returned.
3535
// If no document exists with a given key, a NotFoundError is returned.
3636
// If `_id` field is present in the document body, it is always ignored.
37-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
37+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
3838
UpdateDocument(ctx context.Context, key string, document interface{}) (CollectionDocumentUpdateResponse, error)
3939

4040
// UpdateDocumentWithOptions updates a single document with a given key in the collection.
4141
// The document metadata is returned.
4242
// If no document exists with a given key, a NotFoundError is returned.
4343
// If `_id` field is present in the document body, it is always ignored.
44-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
44+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
4545
UpdateDocumentWithOptions(ctx context.Context, key string, document interface{}, options *CollectionDocumentUpdateOptions) (CollectionDocumentUpdateResponse, error)
4646

4747
// UpdateDocuments updates multiple documents
4848
// The updates are loaded from the given updates slice, the documents metadata are returned.
4949
// If no document exists with a given key, a NotFoundError is returned at its errors index.
5050
// Each element in the update slice must contain a `_key` field.
5151
// If `_id` field is present in the document body, it is always ignored.
52-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
52+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
5353
UpdateDocuments(ctx context.Context, documents interface{}) (CollectionDocumentUpdateResponseReader, error)
5454

5555
// UpdateDocumentsWithOptions updates multiple documents
5656
// The updates are loaded from the given updates slice, the documents metadata are returned.
5757
// If no document exists with a given key, a NotFoundError is returned at its errors index.
5858
// Each element in the update slice must contain a `_key` field.
5959
// If `_id` field is present in the document body, it is always ignored.
60-
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
60+
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
6161
UpdateDocumentsWithOptions(ctx context.Context, documents interface{}, opts *CollectionDocumentUpdateOptions) (CollectionDocumentUpdateResponseReader, error)
6262
}
6363

v2/arangodb/collection_opts.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
type ReplicationFactor int
3030

3131
const (
32-
// ReplicationFactorSatellite represents a satellite collection's replication factor
32+
// ReplicationFactorSatellite represents a SatelliteCollection's replication factor
3333
ReplicationFactorSatellite ReplicationFactor = -1
3434
replicationFactorSatelliteString string = "satellite"
3535
)
@@ -100,7 +100,7 @@ type CollectionExtendedInfo struct {
100100

101101
// WriteConcern contains how many copies must be available before a collection can be written.
102102
// It is required that 1 <= WriteConcern <= ReplicationFactor.
103-
// Default is 1. Not available for satellite collections.
103+
// Default is 1. Not available for SatelliteCollections.
104104
// Available from 3.6 arangod version.
105105
WriteConcern int `json:"writeConcern,omitempty"`
106106

@@ -154,11 +154,11 @@ type CollectionProperties struct {
154154
IsVolatile bool `json:"isVolatile,omitempty"`
155155

156156
// SmartJoinAttribute
157-
// See documentation for smart joins.
157+
// See documentation for SmartJoins.
158158
// This requires ArangoDB Enterprise Edition.
159159
SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`
160160

161-
// This field must be set to the attribute that will be used for sharding or smart graphs.
161+
// This field must be set to the attribute that will be used for sharding or SmartGraphs.
162162
// All vertices are required to have this attribute set. Edges derive the attribute from their connected vertices.
163163
// This requires ArangoDB Enterprise Edition.
164164
SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
@@ -179,7 +179,7 @@ type CollectionProperties struct {
179179
Schema *CollectionSchemaOptions `json:"schema,omitempty"`
180180
}
181181

182-
// IsSatellite returns true if the collection is a satellite collection
182+
// IsSatellite returns true if the collection is a SatelliteCollection
183183
func (p *CollectionProperties) IsSatellite() bool {
184184
return p.ReplicationFactor == ReplicationFactorSatellite
185185
}

v2/arangodb/database_collection_opts.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ type CreateCollectionProperties struct {
8383
// Note: Values of shard key attributes cannot be changed once set. This option is meaningless in a single server setup.
8484
// The default is []string{"_key"}.
8585
ShardKeys []string `json:"shardKeys,omitempty"`
86-
// This field must be set to the attribute that will be used for sharding or smart graphs.
86+
// This field must be set to the attribute that will be used for sharding or SmartGraphs.
8787
// All vertices are required to have this attribute set. Edges derive the attribute from their connected vertices.
8888
// This requires ArangoDB Enterprise Edition.
8989
SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
9090
// SmartJoinAttribute
9191
// In the specific case that the two collections have the same number of shards, the data of the two collections can
9292
// be co-located on the same server for the same shard key values. In this case the extra hop via the coordinator will not be necessary.
93-
// See documentation for smart joins.
93+
// See documentation for SmartJoins.
9494
// This requires ArangoDB Enterprise Edition.
9595
SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`
9696
// Available from 3.7 ArangoDB version
@@ -101,7 +101,7 @@ type CreateCollectionProperties struct {
101101
WaitForSync bool `json:"waitForSync,omitempty"`
102102
// WriteConcern contains how many copies must be available before a collection can be written.
103103
// It is required that 1 <= WriteConcern <= ReplicationFactor.
104-
// Default is 1. Not available for satellite collections.
104+
// Default is 1. Not available for SatelliteCollections.
105105
// Available from 3.6 ArangoDB version.
106106
WriteConcern int `json:"writeConcern,omitempty"`
107107
// ComputedValues let configure collections to generate document attributes when documents are created or modified, using an AQL expression

v2/arangodb/database_query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ type QuerySubOptions struct {
130130
// Additionally, the query plan is returned in the extra.plan sub-attribute.
131131
Profile uint `json:"profile,omitempty"`
132132

133-
// This Enterprise Edition parameter allows to configure how long a DBServer will have time to bring the satellite collections
133+
// This Enterprise Edition parameter allows to configure how long a DBServer will have time to bring the SatelliteCollections
134134
// involved in the query into sync. The default value is 60.0 (seconds). When the max time has been reached the query will be stopped.
135135
SatelliteSyncWait float64 `json:"satelliteSyncWait,omitempty"`
136136

@@ -180,7 +180,7 @@ type QuerySubOptions struct {
180180
ShardIds []string `json:"shardIds,omitempty"`
181181

182182
// [unofficial] This query option can be used in complex queries in case the query optimizer cannot
183-
// automatically detect that the query can be limited to only a single server (e.g. in a disjoint smart graph case).
183+
// automatically detect that the query can be limited to only a single server (e.g. in a Disjoint SmartGraph case).
184184
ForceOneShardAttributeValue *string `json:"forceOneShardAttributeValue,omitempty"`
185185
}
186186

v2/arangodb/graph_vertex_collections.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type GraphVertexCollections interface {
5151

5252
type CreateVertexCollectionOptions struct {
5353
// Satellites contain an array of collection names that will be used to create SatelliteCollections for
54-
// a Hybrid (Disjoint) SmartGraph (Enterprise Edition only)
54+
// a (Disjoint) SmartGraph using SatelliteCollections (Enterprise Edition only)
5555
Satellites []string `json:"satellites,omitempty"`
5656
}
5757

0 commit comments

Comments
 (0)