Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions collection.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2017-2021 ArangoDB GmbH, Cologne, Germany
// Copyright 2017-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -183,7 +183,7 @@ type CollectionProperties struct {

IsSmartChild bool `json:"isSmartChild,omitempty"`

InternalValidatorType *int `json:"internalValidatorType, omitempty"`
InternalValidatorType *int `json:"internalValidatorType,omitempty"`

// Set to create a smart edge or vertex collection.
// This requires ArangoDB Enterprise Edition.
Expand Down
36 changes: 36 additions & 0 deletions v2/arangodb/graph_collection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// DISCLAIMER
//
// Copyright 2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//

package arangodb

import (
"context"
)

type GraphCollection interface {
Name() string
Database() Database

// Count fetches the number of document in the collection.
Count(ctx context.Context) (int64, error)

CollectionDocuments
CollectionIndexes
}
4 changes: 3 additions & 1 deletion v2/arangodb/graph_edge_definitions_edges.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -27,6 +27,8 @@ import (
)

type Edge interface {
GraphCollection

// Name returns the name of the Edge collection
Name() string

Expand Down
5 changes: 4 additions & 1 deletion v2/arangodb/graph_edge_definitions_edges_impl.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,12 +32,15 @@ func newEdgeCollection(edge *graph, edgeColName string) *edgeCollection {
return &edgeCollection{
graph: edge,
edgeColName: edgeColName,
collection: *newCollection(edge.db, edgeColName, edge.modifiers...),
}
}

var _ Edge = &edgeCollection{}

type edgeCollection struct {
collection

edgeColName string

modifiers []connection.RequestModifier
Expand Down
4 changes: 3 additions & 1 deletion v2/arangodb/graph_vertex_collections_vertices.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -27,6 +27,8 @@ import (
)

type VertexCollection interface {
GraphCollection

// Name returns the name of the vertex collection
Name() string

Expand Down
5 changes: 4 additions & 1 deletion v2/arangodb/graph_vertex_collections_vertices_impl.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,12 +32,15 @@ func newVertexCollection(vertex *graph, vertexColName string) *vertexCollection
return &vertexCollection{
graph: vertex,
vertexColName: vertexColName,
collection: *newCollection(vertex.db, vertexColName, vertex.modifiers...),
}
}

var _ VertexCollection = &vertexCollection{}

type vertexCollection struct {
collection

vertexColName string

modifiers []connection.RequestModifier
Expand Down
Loading