Skip to content

Commit

Permalink
WIP - Split Collection interface
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 3, 2023
1 parent e31a726 commit b16f821
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions client/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ import (
"github.com/sourcenetwork/defradb/datastore"
)

// Collection represents a defradb collection.
//
// A Collection is mostly analogous to a SQL table, however a collection is specific to its
// host, and many collections may share the same schema.
//
// Many functions on this object will interact with the underlying datastores.
type Collection interface {
type CollectionDefinition interface {
// Description returns the CollectionDescription of this Collection.
Description() CollectionDescription
// Name returns the name of this collection.
Expand All @@ -33,6 +27,16 @@ type Collection interface {
ID() uint32
// SchemaID returns the ID of the Schema used to define this Collection.
SchemaID() string
}

// Collection represents a defradb collection.
//
// A Collection is mostly analogous to a SQL table, however a collection is specific to its
// host, and many collections may share the same schema.
//
// Many functions on this object will interact with the underlying datastores.
type Collection interface {
CollectionDefinition

// Create a new document.
//
Expand Down

0 comments on commit b16f821

Please sign in to comment.