pub enum Query {
Show 16 variants
Doc {
knowledge: usize,
id: String,
},
Path(RepoPath),
Exists(RepoPath),
Type {
knowledge: usize,
type_name: String,
},
KeyRepository(String),
KeyKnowledge {
knowledge: usize,
slug: String,
},
KeyDocument {
knowledge: usize,
slug: String,
},
Body(RepoPath),
Citations(RepoPath),
Directory(RepoPath),
Schema {
knowledge: usize,
key: String,
},
Planned(RepoPath),
Identities,
Unsettled,
History(String),
Run,
}Expand description
A Query is one fact that a check reads from another document, from a
file, or from a set of documents, such as every document of a type.
Variants§
Doc
The query reads the documents in a store that have the given id, and the facts of those documents.
Fields
Path(RepoPath)
The query reads what is at a path: a document and its facts, a schema, an index, an asset, or a file.
Exists(RepoPath)
The query reads whether a file or a directory exists at a path, and which of the two it is.
Type
The query reads the documents of a type in a store.
Fields
KeyRepository(String)
The query reads the keys with a slug at repository scope.
KeyKnowledge
The query reads the keys with a slug at knowledge scope, in a store.
Fields
KeyDocument
The query reads the keys with a slug at document scope, in every document of a store.
Fields
Body(RepoPath)
The query reads the expanded body of a document, or the text of a file.
Citations(RepoPath)
The query reads the citations of a document.
Directory(RepoPath)
The query reads the index that sokf expects a directory to have.
Schema
The query reads the schema for a key in a store. The key is the type
in the schema’s type const. A schema without that const has its
path as the key. Such a schema matches documents only by its globs.
The store keeps a hash of each schema file whose type or path
is the key, so that a change to one of those files changes the answer
to the query.
Fields
Planned(RepoPath)
The query reads whether a document plans a file at a path: whether an open issue, for example, links the path in its Files section. A check of a planned path reads the query of the path and of each directory above it, because a plan of a directory plans every path under it.
Identities
The query reads the identities of every store, current and former. A qualified id, a link to another store, or an include from another store resolves through them.
Unsettled
The query reads the answer for a pair that the formatter left unsettled, such as one that it didn’t start for. No stat records the formatter, so every run checks the readers of this query again.
History(String)
The query reads the history of git, for the check of a verified
entry, with the commit that HEAD named, or an empty text where it
named none. No stat records the history, so a run whose HEAD
names another commit checks the readers of this query again
(CACHE-1_AC-97).
Run
The query reads what only the run decides, which no stat records:
the time of the run, against which an entry has yet to lapse, or a
git that failed. Every run checks the readers of this query again.
Implementations§
Trait Implementations§
impl Eq for Query
Source§impl Ord for Query
impl Ord for Query
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Query
impl PartialOrd for Query
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Forget for Query
impl Freeze for Query
impl Move for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.