MCPcopy Create free account
hub / github.com/Permify/permify / NewTupleCollection

Function NewTupleCollection

pkg/database/collections.go:13–20  ·  view source on GitHub ↗

NewTupleCollection - Create new tuple collection.

(tuples ...*base.Tuple)

Source from the content-addressed store, hash-verified

11
12// NewTupleCollection - Create new tuple collection.
13func NewTupleCollection(tuples ...*base.Tuple) *TupleCollection {
14 if len(tuples) == 0 {
15 return &TupleCollection{}
16 }
17 return &TupleCollection{
18 tuples: tuples,
19 }
20}
21
22// CreateTupleIterator - Create tuple iterator according to collection.
23func (t *TupleCollection) CreateTupleIterator() *TupleIterator {

Callers 15

RunWithShapeMethod · 0.92
validateFunction · 0.92
ReadRelationshipsMethod · 0.92
watch_test.goFile · 0.92
QueryRelationshipsMethod · 0.92
ReadRelationshipsMethod · 0.92
gc_test.goFile · 0.92
QueryRelationshipsMethod · 0.92
ReadRelationshipsMethod · 0.92

Calls

no outgoing calls

Tested by 5

TestTupleIteratorFunction · 0.68
TestTupleCollectionFunction · 0.68
TestEmptyCollectionsFunction · 0.68
TestToSubjectCollectionFunction · 0.68
TestBundlesFunction · 0.68