Struct apollo_compiler::database::db::RootDatabase
source · pub struct RootDatabase {
pub storage: Storage<RootDatabase>,
}
Fields§
§storage: Storage<RootDatabase>
Trait Implementations§
source§impl Database for RootDatabase
impl Database for RootDatabase
source§fn sweep_all(&self, strategy: SweepStrategy)
fn sweep_all(&self, strategy: SweepStrategy)
Iterates through all query storage and removes any values that
have not been used since the last revision was created. The
intended use-cycle is that you first execute all of your
“main” queries; this will ensure that all query values they
consume are marked as used. You then invoke this method to
remove other values that were not needed for your main query
results.
source§fn salsa_event(&self, event_fn: Event)
fn salsa_event(&self, event_fn: Event)
This function is invoked at key points in the salsa
runtime. It permits the database to be customized and to
inject logging or other custom behavior.
source§fn on_propagated_panic(&self) -> !
fn on_propagated_panic(&self) -> !
This function is invoked when a dependent query is being computed by the
other thread, and that thread panics.
source§fn salsa_runtime(&self) -> &Runtime
fn salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
source§fn salsa_runtime_mut(&mut self) -> &mut Runtime
fn salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
source§impl DatabaseOps for RootDatabase
impl DatabaseOps for RootDatabase
source§fn ops_database(&self) -> &dyn Database
fn ops_database(&self) -> &dyn Database
Upcast this type to a
dyn Database
.source§fn ops_salsa_runtime(&self) -> &Runtime
fn ops_salsa_runtime(&self) -> &Runtime
Gives access to the underlying salsa runtime.
source§fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
fn ops_salsa_runtime_mut(&mut self) -> &mut Runtime
Gives access to the underlying salsa runtime.
source§fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
fn fmt_index(&self, input: DatabaseKeyIndex, fmt: &mut Formatter<'_>) -> Result
Formats a database key index in a human readable fashion.
source§fn maybe_changed_since(
&self,
input: DatabaseKeyIndex,
revision: Revision
) -> bool
fn maybe_changed_since( &self, input: DatabaseKeyIndex, revision: Revision ) -> bool
True if the computed value for
input
may have changed since revision
.source§fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
fn for_each_query(&self, op: &mut dyn FnMut(&dyn QueryStorageMassOps))
Executes the callback for each kind of query.
source§impl DatabaseStorageTypes for RootDatabase
impl DatabaseStorageTypes for RootDatabase
§type DatabaseStorage = __SalsaDatabaseStorage
type DatabaseStorage = __SalsaDatabaseStorage
Defines the “storage type”, where all the query data is kept.
This type is defined by the
database_storage
macro.source§impl Default for RootDatabase
impl Default for RootDatabase
source§fn default() -> RootDatabase
fn default() -> RootDatabase
Returns the “default value” for a type. Read more
source§impl HasQueryGroup<AstStorage> for RootDatabase
impl HasQueryGroup<AstStorage> for RootDatabase
source§fn group_storage(&self) -> &<AstStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<AstStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<HirStorage> for RootDatabase
impl HasQueryGroup<HirStorage> for RootDatabase
source§fn group_storage(&self) -> &<HirStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<HirStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<InputStorage> for RootDatabase
impl HasQueryGroup<InputStorage> for RootDatabase
source§fn group_storage(&self) -> &<InputStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<InputStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.
source§impl HasQueryGroup<ValidationStorage> for RootDatabase
impl HasQueryGroup<ValidationStorage> for RootDatabase
source§fn group_storage(&self) -> &<ValidationStorage as QueryGroup>::GroupStorage
fn group_storage(&self) -> &<ValidationStorage as QueryGroup>::GroupStorage
Access the group storage struct from the database.