Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions v2/arangodb/collection_documents_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ type CollectionDocumentCreate interface {
// If the document data already contains a `_key` field, this will be used as key of the new document,
// otherwise a unique key is created.
// A ConflictError is returned when a `_key` field contains a duplicate key, other any other field violates an index constraint.
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
CreateDocument(ctx context.Context, document interface{}) (CollectionDocumentCreateResponse, error)

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions v2/arangodb/collection_documents_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ type CollectionDocumentDelete interface {
// DeleteDocument removes a single document with given key from the collection.
// The document metadata is returned.
// If no document exists with given key, a NotFoundError is returned.
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
DeleteDocument(ctx context.Context, key string) (CollectionDocumentDeleteResponse, error)

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions v2/arangodb/collection_documents_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ type CollectionDocumentRead interface {
// ReadDocument reads a single document with given key from the collection.
// The document data is stored into result, the document metadata is returned.
// If no document exists with given key, a NotFoundError is returned.
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
ReadDocument(ctx context.Context, key string, result interface{}) (DocumentMeta, error)

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions v2/arangodb/collection_documents_replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@ type CollectionDocumentReplace interface {
// ReplaceDocument replaces a single document with given key in the collection.
// If no document exists with given key, a NotFoundError is returned.
// If `_id` field is present in the document body, it is always ignored.
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
ReplaceDocument(ctx context.Context, key string, document interface{}) (CollectionDocumentReplaceResponse, error)

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions v2/arangodb/collection_documents_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@ type CollectionDocumentUpdate interface {
// The document metadata is returned.
// If no document exists with a given key, a NotFoundError is returned.
// If `_id` field is present in the document body, it is always ignored.
// SmartGraphs and Enterprise Graphs cannot use existing collections and cannot use the document interface
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
UpdateDocument(ctx context.Context, key string, document interface{}) (CollectionDocumentUpdateResponse, error)

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

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

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

Expand Down
10 changes: 5 additions & 5 deletions v2/arangodb/collection_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
type ReplicationFactor int

const (
// ReplicationFactorSatellite represents a satellite collection's replication factor
// ReplicationFactorSatellite represents a SatelliteCollection's replication factor
ReplicationFactorSatellite ReplicationFactor = -1
replicationFactorSatelliteString string = "satellite"
)
Expand Down Expand Up @@ -100,7 +100,7 @@ type CollectionExtendedInfo struct {

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

Expand Down Expand Up @@ -154,11 +154,11 @@ type CollectionProperties struct {
IsVolatile bool `json:"isVolatile,omitempty"`

// SmartJoinAttribute
// See documentation for smart joins.
// See documentation for SmartJoins.
// This requires ArangoDB Enterprise Edition.
SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`

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

// IsSatellite returns true if the collection is a satellite collection
// IsSatellite returns true if the collection is a SatelliteCollection
func (p *CollectionProperties) IsSatellite() bool {
return p.ReplicationFactor == ReplicationFactorSatellite
}
Expand Down
6 changes: 3 additions & 3 deletions v2/arangodb/database_collection_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ type CreateCollectionProperties struct {
// Note: Values of shard key attributes cannot be changed once set. This option is meaningless in a single server setup.
// The default is []string{"_key"}.
ShardKeys []string `json:"shardKeys,omitempty"`
// This field must be set to the attribute that will be used for sharding or smart graphs.
// This field must be set to the attribute that will be used for sharding or SmartGraphs.
// All vertices are required to have this attribute set. Edges derive the attribute from their connected vertices.
// This requires ArangoDB Enterprise Edition.
SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
// SmartJoinAttribute
// In the specific case that the two collections have the same number of shards, the data of the two collections can
// 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.
// See documentation for smart joins.
// See documentation for SmartJoins.
// This requires ArangoDB Enterprise Edition.
SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`
// Available from 3.7 ArangoDB version
Expand All @@ -101,7 +101,7 @@ type CreateCollectionProperties struct {
WaitForSync bool `json:"waitForSync,omitempty"`
// WriteConcern contains how many copies must be available before a collection can be written.
// It is required that 1 <= WriteConcern <= ReplicationFactor.
// Default is 1. Not available for satellite collections.
// Default is 1. Not available for SatelliteCollections.
// Available from 3.6 ArangoDB version.
WriteConcern int `json:"writeConcern,omitempty"`
// ComputedValues let configure collections to generate document attributes when documents are created or modified, using an AQL expression
Expand Down
4 changes: 2 additions & 2 deletions v2/arangodb/database_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type QuerySubOptions struct {
// Additionally, the query plan is returned in the extra.plan sub-attribute.
Profile uint `json:"profile,omitempty"`

// This Enterprise Edition parameter allows to configure how long a DBServer will have time to bring the satellite collections
// This Enterprise Edition parameter allows to configure how long a DBServer will have time to bring the SatelliteCollections
// 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.
SatelliteSyncWait float64 `json:"satelliteSyncWait,omitempty"`

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

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

Expand Down
2 changes: 1 addition & 1 deletion v2/arangodb/graph_vertex_collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type GraphVertexCollections interface {

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

Expand Down
Loading