Documentation
¶
Index ¶
- type Relation
- func (r *Relation) Add(t tuple.Tuple) error
- func (r *Relation) Delete(u map[string]any)
- func (r *Relation) Difference(s *Relation) (*Relation, error)
- func (r *Relation) Intersection(s *Relation) (*Relation, error)
- func (r *Relation) List() iter.Seq[map[string]any]
- func (r *Relation) NaturalJoin(s *Relation) (*Relation, bool)
- func (r *Relation) Projection(p ...string) (*Relation, error)
- func (r *Relation) Rename1(old, new string) (*Relation, error)
- func (r *Relation) Union(s *Relation) (*Relation, error)
- type RelationSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Relation ¶
Relation is a set of tuples with a common schema.
func Clone ¶
Clone returns a new relation with the same schema and tuples as r. The schema is considered read-only so it is not cloned.
func (*Relation) Add ¶
Add adds a tuple to the relation. If the tuple is already in the relation, it does nothing. If the tuple has a different schema than the relation, it returns ErrSchemaMismatch.
func (*Relation) Difference ¶
Difference returns a new relation with tuples that are in r but not in s.
func (*Relation) Intersection ¶
Intersection returns a new relation with tuples that are in r and in s.
type RelationSet ¶
type RelationSet []*Relation
Click to show internal directories.
Click to hide internal directories.