queries

package
v0.0.0-...-3525705 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 33 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 BuilderOptionHidden

func BuilderOptionHidden(hidden sku.Query) builderOptionHidden

func BuilderOptionPermittedSigil

func BuilderOptionPermittedSigil(sigil ids.Sigil) builderOptionPermittedSigil

func BuilderOptionRequireNonEmptyQuery

func BuilderOptionRequireNonEmptyQuery() builderOptionRequireNonEmptyQuery

func BuilderOptions

func BuilderOptions(options ...BuilderOption) builderOptions

nil options are permitted, they are just skipped during application

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.TagSetMutable

func GetTypes

func GetTypes(query *Query) ids.TypeSet

func IsErrBlobMissing

func IsErrBlobMissing(err error) bool

func IsExactlyOneObjectId

func IsExactlyOneObjectId(query *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 (builder *Builder) BuildQueryGroup(
	args ...string,
) (group *Query, err error)

func (*Builder) BuildQueryGroupWithRepoId

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

func (*Builder) WithDebug

func (builder *Builder) WithDebug() *Builder

TODO refactor into BuilderOption

func (*Builder) WithDefaultGenres

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

TODO refactor into BuilderOption

func (*Builder) WithDefaultSigil

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

TODO refactor into BuilderOption

func (*Builder) WithDoNotMatchEmpty

func (builder *Builder) WithDoNotMatchEmpty() *Builder

TODO refactor into BuilderOption

func (*Builder) WithExpanders

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

TODO refactor into BuilderOption

func (*Builder) WithExternalLike

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

TODO

func (*Builder) WithFileExtensions

func (builder *Builder) WithFileExtensions(
	fileExtensions file_extensions.Config,
) *Builder

TODO refactor into BuilderOption

func (*Builder) WithHidden

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

func (*Builder) WithOptions

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

func (*Builder) WithPermittedSigil

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

TODO refactor into BuilderOption

func (*Builder) WithRepoId

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

TODO refactor into BuilderOption

func (*Builder) WithRequireNonEmptyQuery

func (builder *Builder) WithRequireNonEmptyQuery() *Builder

TODO refactor into BuilderOption

func (*Builder) WithTransacted

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

type BuilderOption

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

func BuilderOptionWorkspace

func BuilderOptionWorkspace(
	env BuilderOptionWorkspaceConfigEnv,
) BuilderOption

type BuilderOptionWorkspaceConfigEnv

type BuilderOptionWorkspaceConfigEnv interface {
	env_ui.Env
	GetWorkspaceConfig() workspace_config_blobs.Config
}

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 (err ErrBlobMissing) Error() string

TODO add recovery text

func (ErrBlobMissing) Is

func (err ErrBlobMissing) Is(target error) bool

type ExecutionInfo

type ExecutionInfo struct {
	WorkspaceStore
	sku.FuncPrimitiveQuery
	sku.FuncReadOneInto
}

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() (object *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 MakeExecutorPrimitive

func MakeExecutorPrimitive(
	qg sku.PrimitiveQueryGroup,
	fpq sku.FuncPrimitiveQuery,
	froi sku.FuncReadOneInto,
) ExecutorPrimitive

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
	// contains filtered or unexported fields
}

func (ObjectId) ContainsSku

func (objectId ObjectId) ContainsSku(
	objectGetter sku.TransactedGetter,
) (ok bool)

TODO support exact

func (*ObjectId) ReadFromSeq

func (objectId *ObjectId) ReadFromSeq(seq doddish.Seq) (err error)

func (ObjectId) String

func (objectId ObjectId) String() string

type Query

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

func (*Query) GetDefaultQuery

func (query *Query) GetDefaultQuery() *Query

func (*Query) String

func (query *Query) String() string

func (*Query) StringDebug

func (query *Query) StringDebug() string

func (*Query) StringOptimized

func (query *Query) StringOptimized() string

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 (tags *Tags) AddTag(e *tag_paths.Tag) (err error)

func (*Tags) ContainsSku

func (tags *Tags) ContainsSku(object *sku.Transacted) bool

func (*Tags) Flush

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

func (*Tags) HasChanges

func (tags *Tags) HasChanges() bool

func (*Tags) Load

func (tags *Tags) Load(envRepo env_repo.Env) (err error)

func (*Tags) ReadFrom

func (tags *Tags) ReadFrom(bufferedReader *bufio.Reader) (n int64, err error)

func (*Tags) RemoveDormantTag

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

func (Tags) WriteTo

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

Source Files

  • build_state.go
  • builder.go
  • builder_options.go
  • compound_match.go
  • dormant_counter.go
  • errors.go
  • executor.go
  • executor_primitive.go
  • exp.go
  • exp_object_ids.go
  • exp_sigil_and_genre.go
  • exp_tags_or_types.go
  • group_debug.go
  • main.go
  • object_id.go
  • pinned_object_id.go
  • primitive.go
  • public.go
  • tags.go

Jump to

Keyboard shortcuts

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