|
1 | | - >>> import spack.store |
2 | | - >>> help(spack.store.STORE.db.query) |
3 | | - Help on method query in module spack.database: |
4 | | - |
5 | | - query(*args, **kwargs) method of spack.database.Database instance |
6 | | - Query the Spack database including all upstream databases. |
7 | | - |
8 | | - Args: |
9 | | - query_spec: queries iterate through specs in the database and |
10 | | - return those that satisfy the supplied ``query_spec``. If |
11 | | - query_spec is `any`, This will match all specs in the |
12 | | - database. If it is a spec, we'll evaluate |
13 | | - ``spec.satisfies(query_spec)`` |
14 | | - |
15 | | - known (bool or any, optional): Specs that are "known" are those |
16 | | - for which Spack can locate a ``package.py`` file -- i.e., |
17 | | - Spack "knows" how to install them. Specs that are unknown may |
18 | | - represent packages that existed in a previous version of |
19 | | - Spack, but have since either changed their name or |
20 | | - been removed |
21 | | - |
22 | | - installed (bool or any, or InstallStatus or iterable of |
23 | | - InstallStatus, optional): if ``True``, includes only installed |
24 | | - specs in the search; if ``False`` only missing specs, and if |
25 | | - ``any``, all specs in database. If an InstallStatus or iterable |
26 | | - of InstallStatus, returns specs whose install status |
27 | | - (installed, deprecated, or missing) matches (one of) the |
28 | | - InstallStatus. (default: True) |
29 | | - |
30 | | - explicit (bool or any, optional): A spec that was installed |
31 | | - following a specific user request is marked as explicit. If |
32 | | - instead it was pulled-in as a dependency of a user requested |
33 | | - spec it's considered implicit. |
34 | | - |
35 | | - start_date (datetime, optional): filters the query discarding |
36 | | - specs that have been installed before ``start_date``. |
37 | | - |
38 | | - end_date (datetime, optional): filters the query discarding |
39 | | - specs that have been installed after ``end_date``. |
40 | | - |
41 | | - hashes (container): list or set of hashes that we can use to |
42 | | - restrict the search |
43 | | - |
44 | | - Returns: |
45 | | - list of specs that match the query |
46 | | - (END) |
| 1 | +>>> import spack.store |
| 2 | +>>> help(spack.store.STORE.db.query) |
| 3 | +Help on method query in module spack.database: |
| 4 | + |
| 5 | +query(query_spec: Union[str, ForwardRef('spack.spec.Spec'), NoneType] = None, *, predicate_fn: Optional[Callable[[spack.database.InstallRecord], bool]] = None, installed: Union[bool, spack.enums.InstallRecordStatus] = True, explicit: Optional[bool] = None, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, in_buildcache: Optional[bool] = None, hashes: Optional[List[str]] = None, origin: Optional[str] = None, install_tree: str = 'all') -> List[ForwardRef('spack.spec.Spec')] method of spack.database.Database instance |
| 6 | + Queries the Spack database including all upstream databases. |
| 7 | + |
| 8 | + Args: |
| 9 | + query_spec: if query_spec is ``None``, match all specs in the database. |
| 10 | + If it is a spec, return all specs matching ``spec.satisfies(query_spec)``. |
| 11 | + |
| 12 | + predicate_fn: optional predicate taking an InstallRecord as argument, and returning |
| 13 | + whether that record is selected for the query. It can be used to craft criteria |
| 14 | + that need some data for selection not provided by the Database itself. |
| 15 | + |
| 16 | + installed: if ``True``, includes only installed specs in the search. If ``False`` only |
| 17 | + missing specs, and if ``any``, all specs in database. If an InstallStatus or |
| 18 | + iterable of InstallStatus, returns specs whose install status matches at least |
| 19 | + one of the InstallStatus. |
| 20 | + |
| 21 | + explicit: a spec that was installed following a specific user request is marked as |
| 22 | + explicit. If instead it was pulled-in as a dependency of a user requested spec |
| 23 | + it's considered implicit. |
| 24 | + |
| 25 | + start_date: if set considers only specs installed from the starting date. |
| 26 | + |
| 27 | + end_date: if set considers only specs installed until the ending date. |
| 28 | + |
| 29 | + in_buildcache: specs that are marked in this database as part of an associated binary |
| 30 | + cache are ``in_buildcache``. All other specs are not. This field is used for |
| 31 | + querying mirror indices. By default, it does not check this status. |
| 32 | + |
| 33 | + hashes: list of hashes used to restrict the search |
| 34 | + |
| 35 | + install_tree: query 'all' (default), 'local', 'upstream', or upstream path |
| 36 | + |
| 37 | + origin: origin of the spec |
| 38 | +(END) |
0 commit comments