query

package
v0.0.0-...-381c4e2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VisitAllMatchers

func VisitAllMatchers(
	f schnittstellen.FuncIter[sku.Query],
	matchers ...sku.Query,
) (err error)

Types

type Archiviert

type Archiviert interface {
	sku.Query
	CountArchiviert() int64
	Count() int64
}

func MakeArchiviert

func MakeArchiviert() Archiviert

type Builder

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

func MakeBuilder

func MakeBuilder(
	s standort.Standort,
	akten *akten.Akten,
	ennui sku.Ennui,
	chrome *VirtualStoreInitable,
) (b *Builder)

func (*Builder) BuildQueryGroup

func (b *Builder) BuildQueryGroup(vs ...string) (qg *Group, err error)

func (*Builder) WithCheckedOut

func (b *Builder) WithCheckedOut(
	cos sku.CheckedOutSet,
) *Builder

func (*Builder) WithChrome

func (mb *Builder) WithChrome(vs *VirtualStoreInitable) *Builder

func (*Builder) WithCwd

func (mb *Builder) WithCwd(
	cwd Cwd,
) *Builder

func (*Builder) WithDebug

func (mb *Builder) WithDebug() *Builder

func (*Builder) WithDefaultGattungen

func (mb *Builder) WithDefaultGattungen(
	defaultGattungen kennung.Gattung,
) *Builder

func (*Builder) WithDefaultSigil

func (mb *Builder) WithDefaultSigil(
	defaultSigil kennung.Sigil,
) *Builder

func (*Builder) WithDoNotMatchEmpty

func (b *Builder) WithDoNotMatchEmpty() *Builder

func (*Builder) WithExpanders

func (mb *Builder) WithExpanders(
	expanders kennung.Abbr,
) *Builder

func (*Builder) WithFileExtensionGetter

func (mb *Builder) WithFileExtensionGetter(
	feg schnittstellen.FileExtensionGetter,
) *Builder

func (*Builder) WithHidden

func (mb *Builder) WithHidden(
	hidden sku.Query,
) *Builder

func (*Builder) WithPermittedSigil

func (b *Builder) WithPermittedSigil(s kennung.Sigil) *Builder

func (*Builder) WithRequireNonEmptyQuery

func (b *Builder) WithRequireNonEmptyQuery() *Builder

func (*Builder) WithTransacted

func (b *Builder) WithTransacted(
	zts sku.TransactedSet,
) *Builder

func (*Builder) WithVirtualEtiketten

func (mb *Builder) WithVirtualEtiketten(vs map[string]string) *Builder

func (*Builder) WithVirtualStores

func (mb *Builder) WithVirtualStores(vs map[string]*VirtualStoreInitable) *Builder

type Cwd

type Cwd interface {
	sku.Query
	GetCwdFDs() fd.Set
	GetKennungForFD(*fd.FD) (*kennung.Kennung2, error)
}

type EtikettLua

type EtikettLua struct {
	*Lua
	*Kennung
}

func (*EtikettLua) ContainsSku

func (k *EtikettLua) ContainsSku(sk *sku.Transacted) bool

func (*EtikettLua) String

func (k *EtikettLua) String() string

type Exp

type Exp struct {
	MatchOnEmpty bool
	Or           bool
	Negated      bool
	Exact        bool
	Hidden       bool
	Debug        bool
	Children     []sku.Query
}

func (*Exp) Add

func (e *Exp) Add(m sku.Query) (err error)

func (*Exp) Clone

func (a *Exp) Clone() (b *Exp)

func (*Exp) CollectEtiketten

func (e *Exp) CollectEtiketten(mes kennung.EtikettMutableSet)

func (*Exp) ContainsSku

func (e *Exp) ContainsSku(sk *sku.Transacted) bool

func (*Exp) Each

func (e *Exp) Each(
	f schnittstellen.FuncIter[sku.Query],
) (err error)

func (*Exp) Operator

func (matcher *Exp) Operator() rune

func (*Exp) Reduce

func (e *Exp) Reduce(b *Builder) (err error)

func (*Exp) String

func (e *Exp) String() string

func (*Exp) StringDebug

func (e *Exp) StringDebug() string

type Group

type Group struct {
	Hidden           sku.Query
	OptimizedQueries map[gattung.Gattung]*QueryWithHidden
	UserQueries      map[kennung.Gattung]*QueryWithHidden
	Kennungen        []*kennung.Kennung2
	FDs              fd.MutableSet
	Zettelen         kennung.HinweisMutableSet
	Typen            kennung.TypMutableSet
}

func MakeGroup

func MakeGroup(
	b *Builder,
) *Group

func (*Group) Add

func (qg *Group) Add(q *Query) (err error)

func (*Group) AddExactKennung

func (qg *Group) AddExactKennung(
	b *Builder,
	k Kennung,
) (err error)

func (*Group) ContainsSku

func (qg *Group) ContainsSku(sk *sku.Transacted) bool

func (*Group) Each

func (q *Group) Each(_ schnittstellen.FuncIter[sku.Query]) (err error)

func (*Group) Get

func (*Group) GetCwdFDs

func (qg *Group) GetCwdFDs() fd.Set

func (*Group) GetEtiketten

func (qg *Group) GetEtiketten() kennung.EtikettSet

func (*Group) GetExactlyOneKennung

func (qg *Group) GetExactlyOneKennung(
	g gattung.Gattung,
	c Cwd,
) (k *kennung.Kennung2, s kennung.Sigil, err error)

func (*Group) GetExplicitCwdFDs

func (qg *Group) GetExplicitCwdFDs() fd.Set

func (*Group) GetGattungen

func (qg *Group) GetGattungen() (g kennung.Gattung)

func (*Group) GetTypen

func (qg *Group) GetTypen() kennung.TypSet

func (*Group) IsEmpty

func (qg *Group) IsEmpty() bool

func (*Group) MatcherLen

func (q *Group) MatcherLen() int

func (*Group) Reduce

func (qg *Group) Reduce(b *Builder) (err error)

func (*Group) SortedUserQueries

func (qg *Group) SortedUserQueries() []*QueryWithHidden

func (*Group) String

func (qg *Group) String() string

func (*Group) StringDebug

func (qg *Group) StringDebug() string

func (*Group) StringOptimized

func (qg *Group) StringOptimized() string

type Kennung

type Kennung struct {
	Exact   bool
	Virtual bool
	Debug   bool
	FD      *fd.FD
	*kennung.Kennung2
}

func (Kennung) ContainsSku

func (k Kennung) ContainsSku(sk *sku.Transacted) bool

TODO support exact

func (Kennung) Each

func (Kennung) MatcherLen

func (k Kennung) MatcherLen() int

func (Kennung) Reduce

func (k Kennung) Reduce(b *Builder) (err error)

func (Kennung) String

func (k Kennung) String() string

type Lua

type Lua struct {
	lua.VMPool
}

func MakeLua

func MakeLua(script string) (ml *Lua, err error)

func (*Lua) ContainsSku

func (matcher *Lua) ContainsSku(sk *sku.Transacted) bool

type Query

type Query struct {
	kennung.Sigil
	kennung.Gattung
	Exp

	Kennung map[string]Kennung
}

func (*Query) Add

func (q *Query) Add(m sku.Query) (err error)

func (*Query) Clone

func (a *Query) Clone() (b *Query)

func (*Query) ContainsKennung

func (a *Query) ContainsKennung(k *kennung.Kennung2) bool

func (*Query) ContainsSku

func (q *Query) ContainsSku(sk *sku.Transacted) bool

func (*Query) Each

func (q *Query) Each(_ schnittstellen.FuncIter[sku.Query]) (err error)

func (*Query) GetMatcherSigil

func (a *Query) GetMatcherSigil() sku.QueryWithSigilAndKennung

func (*Query) GetSigil

func (a *Query) GetSigil() kennung.Sigil

func (*Query) IsEmpty

func (a *Query) IsEmpty() bool

func (*Query) MatcherLen

func (q *Query) MatcherLen() int

func (*Query) Merge

func (a *Query) Merge(b *Query) (err error)

func (*Query) SortedKennungen

func (q *Query) SortedKennungen() []string

func (*Query) String

func (q *Query) String() string

func (*Query) StringDebug

func (q *Query) StringDebug() string

type QueryWithHidden

type QueryWithHidden struct {
	Query
	Hidden sku.Query
}

func (*QueryWithHidden) Clone

func (q *QueryWithHidden) Clone() *QueryWithHidden

func (*QueryWithHidden) ContainsSku

func (q *QueryWithHidden) ContainsSku(sk *sku.Transacted) bool

func (*QueryWithHidden) ShouldHide

func (q *QueryWithHidden) ShouldHide(sk *sku.Transacted) bool

type Reducer

type Reducer interface {
	Reduce(*Builder) error
}

type Virtual

type Virtual struct {
	sku.Queryable
	*Kennung
}

func (*Virtual) ContainsSku

func (ve *Virtual) ContainsSku(sk *sku.Transacted) bool

type VirtualStore

type VirtualStore interface {
	Initialize() error
	Flush() error
	CommitTransacted(kinder, mutter *sku.Transacted) error
	ModifySku(*sku.Transacted) error
	Query(*Group, schnittstellen.FuncIter[*sku.Transacted]) error
	sku.Queryable
}

type VirtualStoreInitable

type VirtualStoreInitable struct {
	VirtualStore
	// contains filtered or unexported fields
}

func (*VirtualStoreInitable) Flush

func (ve *VirtualStoreInitable) Flush() (err error)

func (*VirtualStoreInitable) Initialize

func (ve *VirtualStoreInitable) Initialize() (err error)

func (*VirtualStoreInitable) Query

func (ve *VirtualStoreInitable) Query(
	qg *Group,
	f schnittstellen.FuncIter[*sku.Transacted],
) (err error)

Jump to

Keyboard shortcuts

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