pyorderly.outpack.search
Classes
Functions
|
|
|
Search an outpack repository for all packets that match the given query. |
|
Search an outpack repository for a packet that matches the given query. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents
- class pyorderly.outpack.search.Query
- text: str
- node: Any
- __str__()
- classmethod parse(text)
- is_single_valued()
Return true if the query is guaranteed to produce at most a single result.
This could be either an expression wrapped in a single(…) or latest(…) call, or it is an ID lookup of the form id == ….
- class pyorderly.outpack.search.QueryEnv(root: pyorderly.outpack.root.OutpackRoot, options: pyorderly.outpack.search_options.SearchOptions, this: pyorderly.outpack.metadata.Parameters | None)
- index
- this
- class pyorderly.outpack.search.QueryIndex(root, options)
-
- index: dict[str, pyorderly.outpack.metadata.MetadataCore]
- pyorderly.outpack.search.search(query: Query | str, *, root: pyorderly.outpack.root.OutpackRoot | str | os.PathLike, options: pyorderly.outpack.search_options.SearchOptions | None = None, this: pyorderly.outpack.metadata.Parameters | None = None) set[str]
Search an outpack repository for all packets that match the given query.
This may return zero or more packet IDs.
- pyorderly.outpack.search.search_unique(query: Query | str, *, root: pyorderly.outpack.root.OutpackRoot | str | os.PathLike, options: pyorderly.outpack.search_options.SearchOptions | None = None, this: pyorderly.outpack.metadata.Parameters | None = None)
Search an outpack repository for a packet that matches the given query.
Returns a single packet ID. Throws an exception if no packet is found or if the query is not syntactically guaranteed to find at most one.
- pyorderly.outpack.search.eval_test_value(node, env: QueryEnv, metadata: pyorderly.outpack.metadata.MetadataCore) bool | int | float | str | None
- pyorderly.outpack.search.eval_test_one(node: outpack_query_parser.Test, env: QueryEnv, metadata: pyorderly.outpack.metadata.MetadataCore) bool
- pyorderly.outpack.search.eval_boolean(node: outpack_query_parser.BooleanExpr, env: QueryEnv) set[str]