github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/datastore/relationshipquerytree.go (about)

     1  package datastore
     2  
     3  type RelationshipQueryOperation int
     4  
     5  const (
     6  	RelationshipQueryNone RelationshipQueryOperation = 0
     7  	RelationshipQueryOr   RelationshipQueryOperation = 1
     8  	RelationshipQueryAnd  RelationshipQueryOperation = 2
     9  )
    10  
    11  type RelationshipsQueryTree struct {
    12  	op       RelationshipQueryOperation
    13  	filter   RelationshipsFilter
    14  	children []RelationshipsQueryTree
    15  }
    16  
    17  func NewRelationshipQueryTree(filter RelationshipsFilter) RelationshipsQueryTree {
    18  	return RelationshipsQueryTree{
    19  		op:       RelationshipQueryNone,
    20  		filter:   filter,
    21  		children: nil,
    22  	}
    23  }