query

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuilderOptionDefaultGenres

func BuilderOptionDefaultGenres(
	genres ...genres.Genre,
) builderOptionDefaultGenre

func BuilderOptionDefaultSigil

func BuilderOptionDefaultSigil(sigils ...ids.Sigil) builderOptionDefaultSigil

func BuilderOptions

func BuilderOptions(options ...BuilderOption) builderOptions

nil options are permitted, they are just skipped during application

func BuilderOptionsOld

func BuilderOptionsOld(o any, remainder ...BuilderOption) builderOptions

func ContainsExternalSku

func ContainsExternalSku(
	qg *Query,
	el sku.ExternalLike,
	state checked_out_state.State,
) (ok bool)

func ContainsSkuCheckedOutState

func ContainsSkuCheckedOutState(
	qg *Query,
	state checked_out_state.State,
) (ok bool)

func GetTags

func GetTags(query *Query) ids.TagMutableSet

func GetTypes

func GetTypes(qg *Query) ids.TypeSet

func IsErrBlobMissing

func IsErrBlobMissing(err error) bool

func IsExactlyOneObjectId

func IsExactlyOneObjectId(qg *Query) bool

Types

type Builder

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

func MakeBuilder

func MakeBuilder(
	envRepo env_repo.Env,
	typedBlobStore typed_blob_store.Stores,
	objectProbeIndex sku.ObjectProbeIndex,
	luaVMPoolBuilder *lua.VMPoolBuilder,
	workspaceStoreGetter store_workspace.StoreGetter,
) (b *Builder)

func (*Builder) BuildQueryGroup

func (b *Builder) BuildQueryGroup(vs ...string) (group *Query, err error)

func (*Builder) BuildQueryGroupWithRepoId

func (b *Builder) BuildQueryGroupWithRepoId(
	externalQueryOptions sku.ExternalQueryOptions,
	values ...string,
) (query *Query, err error)

func (*Builder) WithDebug

func (mb *Builder) WithDebug() *Builder

TODO refactor into BuilderOption

func (*Builder) WithDefaultGenres

func (mb *Builder) WithDefaultGenres(
	defaultGenres ids.Genre,
) *Builder

TODO refactor into BuilderOption

func (*Builder) WithDefaultSigil

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

TODO refactor into BuilderOption

func (*Builder) WithDoNotMatchEmpty

func (b *Builder) WithDoNotMatchEmpty() *Builder

TODO refactor into BuilderOption

func (*Builder) WithExpanders

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

TODO refactor into BuilderOption

func (*Builder) WithExternalLike

func (b *Builder) WithExternalLike(
	zts sku.SkuTypeSet,
) *Builder

TODO

func (*Builder) WithFileExtensions

func (mb *Builder) WithFileExtensions(
	feg interfaces.FileExtensions,
) *Builder

TODO refactor into BuilderOption

func (*Builder) WithHidden

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

func (*Builder) WithOptions

func (b *Builder) WithOptions(options BuilderOption) *Builder

func (*Builder) WithPermittedSigil

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

TODO refactor into BuilderOption

func (*Builder) WithRepoId

func (mb *Builder) WithRepoId(
	repoId ids.RepoId,
) *Builder

TODO refactor into BuilderOption

func (*Builder) WithRequireNonEmptyQuery

func (b *Builder) WithRequireNonEmptyQuery() *Builder

TODO refactor into BuilderOption

func (*Builder) WithTransacted

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

type BuilderOption

type BuilderOption interface {
	Apply(*Builder) *Builder
}

type BuilderOptionGetter

type BuilderOptionGetter interface {
	GetQueryBuilderOptions() builderOptionsOld
}

type BuilderOptionWorkspace

type BuilderOptionWorkspace struct {
	Env BuilderOptionWorkspaceConfigGetter
}

func (BuilderOptionWorkspace) Apply

func (options BuilderOptionWorkspace) Apply(builder *Builder) *Builder

type BuilderOptionWorkspaceConfigGetter

type BuilderOptionWorkspaceConfigGetter interface {
	GetWorkspaceConfig() workspace_config_blobs.Blob
}

type BuilderOptionsMulti

type BuilderOptionsMulti []BuilderOption

type CompoundMatch

type CompoundMatch struct {
	sku.Queryable
	*ObjectId
}

func (*CompoundMatch) ContainsSku

func (k *CompoundMatch) ContainsSku(tg sku.TransactedGetter) bool

func (*CompoundMatch) String

func (k *CompoundMatch) String() string

type DormantCounter

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

func MakeDormantCounter

func MakeDormantCounter() DormantCounter

type ErrBlobMissing

type ErrBlobMissing struct {
	ObjectId
	env_dir.ErrBlobMissing
}

func (ErrBlobMissing) Error

func (e ErrBlobMissing) Error() string

TODO add recovery text

func (ErrBlobMissing) Is

func (e ErrBlobMissing) Is(target error) bool

type Executor

type Executor struct {
	ExecutionInfo
	Out interfaces.FuncIter[sku.ExternalLike]
	// contains filtered or unexported fields
}

TODO use ExecutorPrimitive

func MakeExecutorWithExternalStore

func MakeExecutorWithExternalStore(
	query *Query,
	fpq sku.FuncPrimitiveQuery,
	froi sku.FuncReadOneInto,
	workspaceStore WorkspaceStore,
) Executor

func (*Executor) ExecuteExactlyOne

func (executor *Executor) ExecuteExactlyOne() (sk *sku.Transacted, err error)

func (*Executor) ExecuteExactlyOneExternalObject

func (executor *Executor) ExecuteExactlyOneExternalObject(
	permitInternal bool,
) (object *sku.Transacted, err error)

TODO refactor into methods that have internal in the name

func (*Executor) ExecuteSkuType

func (executor *Executor) ExecuteSkuType(
	out interfaces.FuncIter[sku.SkuType],
) (err error)

func (*Executor) ExecuteTransacted

func (e *Executor) ExecuteTransacted(
	out interfaces.FuncIter[*sku.Transacted],
) (err error)

func (*Executor) ExecuteTransactedAsSkuType

func (e *Executor) ExecuteTransactedAsSkuType(
	out interfaces.FuncIter[sku.SkuType],
) (err error)

func (Executor) Get

func (qg Executor) Get(g genres.Genre) (sku.QueryWithSigilAndObjectId, bool)

TODO migrate this to the query executor

func (Executor) GetSigil

func (qg Executor) GetSigil() (s ids.Sigil)

func (Executor) HasHidden

func (qg Executor) HasHidden() bool

type ExecutorPrimitive

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

func (*ExecutorPrimitive) ExecuteExternalLike

func (e *ExecutorPrimitive) ExecuteExternalLike(
	out interfaces.FuncIter[sku.ExternalLike],
) (err error)

func (*ExecutorPrimitive) ExecuteTransacted

func (e *ExecutorPrimitive) ExecuteTransacted(
	out interfaces.FuncIter[*sku.Transacted],
) (err error)

type ObjectId

type ObjectId struct {
	Exact   bool
	Virtual bool
	Debug   bool

	*ids.ObjectId
}

func (ObjectId) ContainsSku

func (exp ObjectId) ContainsSku(tg sku.TransactedGetter) (ok bool)

TODO support exact

func (ObjectId) String

func (k ObjectId) String() string

type Query

type Query struct {
	sku.ExternalQueryOptions
	// contains filtered or unexported fields
}

func (*Query) GetDefaultQuery

func (q *Query) GetDefaultQuery() *Query

func (*Query) String

func (qg *Query) String() string

func (*Query) StringDebug

func (qg *Query) StringDebug() string

func (*Query) StringOptimized

func (qg *Query) StringOptimized() string

type QueryBuilderModifier

type QueryBuilderModifier interface {
	ModifyBuilder(*Builder)
}

type QueryCheckedOut

type QueryCheckedOut interface {
	QueryCheckedOut(
		query *Query,
		output interfaces.FuncIter[sku.SkuType],
	) (err error)
}

type Tags

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

TODO move implicit tags here

func (*Tags) AddTag

func (sch *Tags) AddTag(e *tag_paths.Tag) (err error)

func (*Tags) ContainsSku

func (sch *Tags) ContainsSku(sk *sku.Transacted) bool

func (*Tags) Flush

func (sch *Tags) Flush(
	s env_repo.Env,
	printerHeader interfaces.FuncIter[string],
	dryRun bool,
) (err error)

func (*Tags) GetChanges

func (sch *Tags) GetChanges() (out []string)

func (*Tags) HasChanges

func (sch *Tags) HasChanges() bool

func (*Tags) Load

func (sch *Tags) Load(s env_repo.Env) (err error)

func (*Tags) ReadFrom

func (s *Tags) ReadFrom(r *bufio.Reader) (n int64, err error)

func (*Tags) RemoveDormantTag

func (sch *Tags) RemoveDormantTag(e *tag_paths.Tag) (err error)

func (Tags) WriteTo

func (s Tags) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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