index

package
v0.0.0-...-33f344c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTreeIndex

type BTreeIndex struct {
	// contains filtered or unexported fields
}

func BuildIndex

func BuildIndex() *BTreeIndex

func (*BTreeIndex) Assert

func (idx *BTreeIndex) Assert(assertion Datum) (conclusion Datum, err error)

Asserts the given datum in the database. This returns the existing datum with the same assertion or the datum retracted by this assertion, if any. This returns an error if the assertion is not consistent with the database, e.g. violates a unique constraint, has a value inconsistent with its attribute, etc.

func (*BTreeIndex) AttrByID

func (idx *BTreeIndex) AttrByID(id ID) Attr

func (*BTreeIndex) AttrByIdent

func (idx *BTreeIndex) AttrByIdent(ident Ident) Attr

func (*BTreeIndex) Clone

func (idx *BTreeIndex) Clone() *BTreeIndex

func (*BTreeIndex) Filter

func (idx *BTreeIndex) Filter(typ IndexType, d Datum) *iterator.Iterator

func (*BTreeIndex) InitSys

func (idx *BTreeIndex) InitSys() *BTreeIndex

func (*BTreeIndex) ResolveARef

func (idx *BTreeIndex) ResolveARef(aref ARef) (id ID)

func (*BTreeIndex) ResolveEReadRef

func (idx *BTreeIndex) ResolveEReadRef(eref EReadRef) (id ID)

func (*BTreeIndex) ResolveIdent

func (idx *BTreeIndex) ResolveIdent(ident Ident) ID

func (*BTreeIndex) ResolveLookupRef

func (idx *BTreeIndex) ResolveLookupRef(ref LookupRef) (id ID)

func (*BTreeIndex) Retract

func (idx *BTreeIndex) Retract(assertion Datum) (err error)

func (*BTreeIndex) Select

func (idx *BTreeIndex) Select(sel Selection) *iterator.Iterator

func (*BTreeIndex) SelectOne

func (idx *BTreeIndex) SelectOne(sel Selection) (datum Datum)

type Constraints

type Constraints struct {
	E ids.Constraint
	A ids.Constraint
	V VSel
}

The Constraints builder assumes the responsibility of ensuring the components are satisfiable by the index, and that sets have been converted to ranges if desirable.

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (Node) Less

func (n1 Node) Less(than btree.Item) bool

type ValueFilter

type ValueFilter struct {
	Pred predicate
	Min  Value
	Max  Value
}

TODO how do we indicate and handle open/closedness on the bounds?

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL