Documentation
¶
Index ¶
- Constants
- Variables
- func FilterAvetAndVaet(db *Db, datoms []index.Datom) ([]index.Datom, []index.Datom)
- type AevtIndex
- type Attribute
- type AvetIndex
- type Cardinality
- type Db
- func (db *Db) Aevt() AevtIndex
- func (db *Db) AsOf(t int) *Db
- func (db *Db) AsOfT() int
- func (db *Db) AsOfTime(t time.Time) *Db
- func (db *Db) Attribute(id int) *Attribute
- func (db *Db) Avet() AvetIndex
- func (db *Db) BasisT() int
- func (db *Db) Eavt() EavtIndex
- func (db *Db) Entid(lookup HasLookup) int
- func (db *Db) EntidAt(part HasLookup, t int) int
- func (db *Db) EntidAtTime(part HasLookup, t time.Time) int
- func (db *Db) Entity(id int) Entity
- func (db *Db) Filter(filter Filter) *Db
- func (db *Db) History() *Db
- func (db *Db) Ident(entity int) *Keyword
- func (db *Db) IsFiltered() bool
- func (db *Db) NextT() int
- func (db *Db) Search(pattern Pattern) index.Iterator
- func (db *Db) Since(t int) *Db
- func (db *Db) SinceT() int
- func (db *Db) SinceTime(t time.Time) *Db
- func (db *Db) Vaet() VaetIndex
- func (db *Db) WithDatoms(datoms []index.Datom) *Db
- func (db *Db) WithDatomsT(basisT, nextT int, datoms []index.Datom) *Db
- type EavtIndex
- type Entity
- type Filter
- type HasLookup
- type Id
- type Keyword
- type LookupRef
- type Pattern
- type Unique
- type VaetIndex
Constants ¶
View Source
const ( CardinalityOne = 35 CardinalityMany = 36 )
Variables ¶
Functions ¶
Types ¶
type AevtIndex ¶
type AevtIndex struct {
// contains filtered or unexported fields
}
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func (Attribute) Cardinality ¶
func (a Attribute) Cardinality() Cardinality
type AvetIndex ¶
type AvetIndex struct {
// contains filtered or unexported fields
}
type Cardinality ¶
type Cardinality int
func (Cardinality) IsValid ¶
func (c Cardinality) IsValid() bool
func (Cardinality) String ¶
func (c Cardinality) String() string
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
func New ¶
func New(eavt, aevt, avet, vaet *index.MergedIndex) *Db
func NewInMemory ¶
func NewInMemory(eavt, aevt, avet, vaet *index.MemoryIndex) *Db
func (*Db) IsFiltered ¶
type EavtIndex ¶
type EavtIndex struct {
// contains filtered or unexported fields
}
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (Entity) AsMap ¶
AsMap returns a view of this entity as a map.
The returned map will only contain cached attributes. To get a map of all attributes call `.Touch` first.
func (Entity) Get ¶
Get retrieves the value for the attribute.
The resulting value is cached. If no value is found, `nil` is returned.
Click to show internal directories.
Click to hide internal directories.