defradb
defradb copied to clipboard
Implement the Collection Exists Function
Implement the cli and http Collection Exists Function that already has a public method on client.Collection
(in client/collection.go).
It should respect ACP logic and only show true for documents that exist and are accessible.
Here is the public function we have so far (after acp is merged):
// Exists checks if a given document exists with supplied DocID.
//
// Will return true if a matching document exists, otherwise will return false.
Exists(ctx context.Context, identity immutable.Option[string], docID DocID) (bool, error)