mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-20 03:52:32 -05:00
* feat(search): introduce search query package With the increasing complexity of how we organize our resources, the search must also be able to find them using entity properties. The query package provides the necessary functionality to do this. This makes it possible to search for resources via KQL, the microsoft spec is largely covered and can be used for this. In the current state, the legacy query language is still used, in a future update this will be deprecated and KQL will become the standard
22 lines
565 B
Go
22 lines
565 B
Go
// Package query provides functions to work with the different search query flavours.
|
|
package query
|
|
|
|
import (
|
|
"github.com/owncloud/ocis/v2/services/search/pkg/query/ast"
|
|
)
|
|
|
|
// Builder is the interface that wraps the basic Build method.
|
|
type Builder interface {
|
|
Build(qs string) (*ast.Ast, error)
|
|
}
|
|
|
|
// Compiler is the interface that wraps the basic Compile method.
|
|
type Compiler[T any] interface {
|
|
Compile(ast *ast.Ast) (T, error)
|
|
}
|
|
|
|
// Creator is the interface that wraps the basic Create method.
|
|
type Creator[T any] interface {
|
|
Create(qs string) (T, error)
|
|
}
|