pub struct RootDatabase {
    pub storage: Storage<RootDatabase>,
}

Fields§

§storage: Storage<RootDatabase>

Trait Implementations§

source§

impl Database for RootDatabase

source§

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)

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) -> !

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

Gives access to the underlying salsa runtime.
source§

fn salsa_runtime_mut(&mut self) -> &mut Runtime

Gives access to the underlying salsa runtime.
source§

impl DatabaseOps for RootDatabase

source§

fn ops_database(&self) -> &dyn Database

Upcast this type to a dyn Database.
source§

fn ops_salsa_runtime(&self) -> &Runtime

Gives access to the underlying salsa runtime.
source§

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

Formats a database key index in a human readable fashion.
source§

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))

Executes the callback for each kind of query.
source§

impl DatabaseStorageTypes for RootDatabase

§

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

source§

fn default() -> RootDatabase

Returns the “default value” for a type. Read more
source§

impl HasQueryGroup<AstStorage> for RootDatabase

source§

fn group_storage(&self) -> &<AstStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<HirStorage> for RootDatabase

source§

fn group_storage(&self) -> &<HirStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<InputStorage> for RootDatabase

source§

fn group_storage(&self) -> &<InputStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl HasQueryGroup<ValidationStorage> for RootDatabase

source§

fn group_storage(&self) -> &<ValidationStorage as QueryGroup>::GroupStorage

Access the group storage struct from the database.
source§

impl ParallelDatabase for RootDatabase

source§

fn snapshot(&self) -> Snapshot<RootDatabase>

Creates a second handle to the database that holds the database fixed at a particular revision. So long as this “frozen” handle exists, any attempt to set an input will block. Read more
source§

impl Upcast<dyn HirDatabase> for RootDatabase

source§

fn upcast(&self) -> &(dyn HirDatabase + 'static)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<DB> AstDatabase for DBwhere DB: InputDatabase + Database + HasQueryGroup<AstStorage>,

source§

fn ast(&self, key0: FileId) -> SyntaxTree

Get an AST for a particular file. Returns a rowan SyntaxTree. The SyntaxTree can be safely shared between threads as it’s Send and Sync.
source§

fn document(&self, key0: FileId) -> GreenNode

Get a file’s GraphQL Document. Returns a rowan Green Node. This is the top level document node that can be used when going between an SyntaxNodePtr to an actual SyntaxNode.
source§

fn syntax_errors(&self) -> Vec<ApolloDiagnostic, Global>

Get syntax errors found in the compiler’s manifest.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<DB> HirDatabase for DBwhere DB: InputDatabase + AstDatabase + Database + HasQueryGroup<HirStorage>,

source§

fn type_system_definitions(&self) -> Arc<TypeSystemDefinitions, Global>

Return all type system definitions defined in the compiler.
source§

fn type_system(&self) -> Arc<TypeSystem, Global>

Return a TypeSystem containing definitions and more. Read more
source§

fn extensions(&self) -> Arc<Vec<TypeExtension, Global>, Global>

Return all the extensions defined in the type system.
source§

fn operations( &self, key0: FileId ) -> Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global>

Return all the operations defined in a file.
source§

fn fragments( &self, key0: FileId ) -> Arc<IndexMap<String, Arc<FragmentDefinition, Global>, RandomState>, Global>

Return all the fragments defined in a file.
source§

fn all_operations( &self ) -> Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global>

Return all the operations defined in any file.
source§

fn all_fragments( &self ) -> Arc<IndexMap<String, Arc<FragmentDefinition, Global>, RandomState>, Global>

Return all the fragments defined in any file.
source§

fn schema(&self) -> Arc<SchemaDefinition, Global>

Return schema definition defined in the compiler.
source§

fn object_types( &self ) -> Arc<IndexMap<String, Arc<ObjectTypeDefinition, Global>, RandomState>, Global>

Return all object type definitions defined in the compiler.
source§

fn object_types_with_built_ins( &self ) -> Arc<IndexMap<String, Arc<ObjectTypeDefinition, Global>, RandomState>, Global>

Return all object type definitions, including instrospection types like __Schema, defined in the compiler.
source§

fn scalars( &self ) -> Arc<IndexMap<String, Arc<ScalarTypeDefinition, Global>, RandomState>, Global>

Return all scalar type definitions defined in the compiler.
source§

fn enums( &self ) -> Arc<IndexMap<String, Arc<EnumTypeDefinition, Global>, RandomState>, Global>

Return all enum type definitions defined in the compiler.
source§

fn enums_with_built_ins( &self ) -> Arc<IndexMap<String, Arc<EnumTypeDefinition, Global>, RandomState>, Global>

Return all enums, including introspection types like __TypeKind, defined in the compiler.
source§

fn unions( &self ) -> Arc<IndexMap<String, Arc<UnionTypeDefinition, Global>, RandomState>, Global>

Return all union type definitions defined in the compiler.
source§

fn interfaces( &self ) -> Arc<IndexMap<String, Arc<InterfaceTypeDefinition, Global>, RandomState>, Global>

Return all interface type definitions defined in the compiler.
source§

fn directive_definitions( &self ) -> Arc<IndexMap<String, Arc<DirectiveDefinition, Global>, RandomState>, Global>

Return all directive definitions defined in the compiler.
source§

fn input_objects( &self ) -> Arc<IndexMap<String, Arc<InputObjectTypeDefinition, Global>, RandomState>, Global>

Return all input object type definitions defined in the compiler.
source§

fn find_operation( &self, key0: FileId, key1: Option<String> ) -> Option<Arc<OperationDefinition, Global>>

Return an operation definition corresponding to the name and file id. If name is None, and there is only one operation, that operation will be returned. If name is None, and there is more than one operation, None will be returned.
source§

fn find_fragment_by_name( &self, key0: FileId, key1: String ) -> Option<Arc<FragmentDefinition, Global>>

Return an fragment definition corresponding to the name and file id. Result of this query is not cached internally.
source§

fn find_object_type_by_name( &self, key0: String ) -> Option<Arc<ObjectTypeDefinition, Global>>

Return an object type definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_union_by_name( &self, key0: String ) -> Option<Arc<UnionTypeDefinition, Global>>

Return an union type definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_enum_by_name( &self, key0: String ) -> Option<Arc<EnumTypeDefinition, Global>>

Return an enum type definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_scalar_by_name( &self, key0: String ) -> Option<Arc<ScalarTypeDefinition, Global>>

Return a scalar type definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_interface_by_name( &self, key0: String ) -> Option<Arc<InterfaceTypeDefinition, Global>>

Return an interface type definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_directive_definition_by_name( &self, key0: String ) -> Option<Arc<DirectiveDefinition, Global>>

Return an directive definition corresponding to the name. Result of this query is not cached internally.
source§

fn find_types_with_directive( &self, key0: String ) -> Arc<Vec<TypeDefinition, Global>, Global>

Return any type definitions that contain the corresponding directive
source§

fn find_input_object_by_name( &self, key0: String ) -> Option<Arc<InputObjectTypeDefinition, Global>>

Return an input object type definition corresponding to the name. Result of this query is not cached internally.
source§

fn types_definitions_by_name( &self ) -> Arc<IndexMap<String, TypeDefinition, RandomState>, Global>

Returns a map of type definitions in a GraphQL schema, Where the key is the type name and the value is a TypeDefinition representing the type.
source§

fn find_type_definition_by_name(&self, key0: String) -> Option<TypeDefinition>

Return a type definition corresponding to the name. Result of this query is not cached internally.
source§

fn query_operations( &self, key0: FileId ) -> Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global>

Return all query operations in a corresponding file.
source§

fn mutation_operations( &self, key0: FileId ) -> Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global>

Return all mutation operations in a corresponding file.
source§

fn subscription_operations( &self, key0: FileId ) -> Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global>

Return all subscription operations in a corresponding file.
source§

fn operation_fields( &self, key0: SelectionSet ) -> Arc<Vec<Field, Global>, Global>

Return the fields in a selection set, not including fragments.
source§

fn operation_inline_fragment_fields( &self, key0: SelectionSet ) -> Arc<Vec<Field, Global>, Global>

Return all operation inline fragment fields in a corresponding selection set.
source§

fn operation_fragment_spread_fields( &self, key0: SelectionSet ) -> Arc<Vec<Field, Global>, Global>

Return all operation fragment spread fields in a corresponding selection set.
source§

fn operation_fragment_references( &self, key0: SelectionSet ) -> Arc<Vec<Arc<FragmentDefinition, Global>, Global>, Global>

Return all fragment definitions referenced in the operation.
source§

fn flattened_operation_fields( &self, key0: SelectionSet ) -> Vec<Arc<Field, Global>, Global>

Return the fields that selection_set selects including visiting fragments and inline fragments.
source§

fn selection_variables( &self, key0: SelectionSet ) -> Arc<HashSet<Variable, RandomState>, Global>

Return all variables in a corresponding selection set.
source§

fn operation_definition_variables( &self, key0: Arc<Vec<VariableDefinition, Global>, Global> ) -> Arc<HashSet<Variable, RandomState>, Global>

Return all variables in corresponding variable definitions.
source§

fn subtype_map( &self ) -> Arc<HashMap<String, HashSet<String, RandomState>, RandomState>, Global>

Return a subtype map of the current compiler’s type system. Read more
source§

fn is_subtype(&self, key0: String, key1: String) -> bool

Return true if the provided maybe_subtype is a subtype of the corresponding abstract_type. Read more
source§

impl<DB> InputDatabase for DBwhere DB: Database + HasQueryGroup<InputStorage>,

source§

fn recursion_limit(&self) -> Option<usize>

Get the currently set recursion limit.
source§

fn set_recursion_limit(&mut self, value__: Option<usize>)

Set the value of the recursion_limit input. Read more
source§

fn set_recursion_limit_with_durability( &mut self, value__: Option<usize>, durability__: Durability )

Set the value of the recursion_limit input and promise that its value will never change again. Read more
source§

fn token_limit(&self) -> Option<usize>

Get the currently set token limit.
source§

fn set_token_limit(&mut self, value__: Option<usize>)

Set the value of the token_limit input. Read more
source§

fn set_token_limit_with_durability( &mut self, value__: Option<usize>, durability__: Durability )

Set the value of the token_limit input and promise that its value will never change again. Read more
source§

fn type_system_hir_input(&self) -> Option<Arc<TypeSystem, Global>>

Get input source of the corresponding file.
source§

fn set_type_system_hir_input( &mut self, value__: Option<Arc<TypeSystem, Global>> )

Set the value of the type_system_hir_input input. Read more
source§

fn set_type_system_hir_input_with_durability( &mut self, value__: Option<Arc<TypeSystem, Global>>, durability__: Durability )

Set the value of the type_system_hir_input input and promise that its value will never change again. Read more
source§

fn input(&self, key0: FileId) -> Source

source§

fn set_input(&mut self, key0: FileId, value__: Source)

Set the value of the input input. Read more
source§

fn set_input_with_durability( &mut self, key0: FileId, value__: Source, durability__: Durability )

Set the value of the input input and promise that its value will never change again. Read more
source§

fn source_code(&self, key0: FileId) -> Arc<str, Global>

Get the GraphQL source text for a file.
source§

fn source_type(&self, key0: FileId) -> SourceType

Get the source type (document/schema/executable) for a file.
source§

fn source_files(&self) -> Vec<FileId, Global>

Get all file ids currently in the compiler.
source§

fn set_source_files(&mut self, value__: Vec<FileId, Global>)

Set the value of the source_files input. Read more
source§

fn set_source_files_with_durability( &mut self, value__: Vec<FileId, Global>, durability__: Durability )

Set the value of the source_files input and promise that its value will never change again. Read more
source§

fn source_file(&self, key0: PathBuf) -> Option<FileId>

Find source file by file name.
source§

fn source_with_lines(&self, key0: FileId) -> Arc<Source, Global>

Get the GraphQL source text for a file, split up into lines for printing diagnostics.
source§

fn source_cache(&self) -> Arc<SourceCache, Global>

Get all GraphQL sources known to the compiler, split up into lines for printing diagnostics.
source§

fn type_definition_files(&self) -> Vec<FileId, Global>

Get all type system definition (GraphQL schema) files.
source§

fn executable_definition_files(&self) -> Vec<FileId, Global>

Get all executable definition (GraphQL query) files.
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<DB> ValidationDatabase for DBwhere DB: Upcast<dyn HirDatabase> + InputDatabase + AstDatabase + HirDatabase + Database + HasQueryGroup<ValidationStorage>,

source§

fn validate(&self) -> Vec<ApolloDiagnostic, Global>

Validate all documents.
source§

fn validate_type_system(&self) -> Vec<ApolloDiagnostic, Global>

Validate the type system, combined of all type system documents known to the compiler.
source§

fn validate_executable(&self, key0: FileId) -> Vec<ApolloDiagnostic, Global>

Validate an executable document.
source§

fn validate_name_uniqueness(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_schema_definition( &self, key0: Arc<SchemaDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_root_operation_definitions( &self, key0: Vec<RootOperationTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_scalar_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_scalar_definition( &self, key0: Arc<ScalarTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_enum_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_enum_definition( &self, key0: Arc<EnumTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_enum_value( &self, key0: EnumValueDefinition ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_union_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_union_definition( &self, key0: Arc<UnionTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_interface_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_interface_definition( &self, key0: Arc<InterfaceTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_implements_interfaces( &self, key0: String, key1: Vec<ImplementsInterface, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_directive_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_directives( &self, key0: Vec<Directive, Global>, key1: DirectiveLocation, key2: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_input_object_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_input_object_definition( &self, key0: Arc<InputObjectTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_input_values( &self, key0: Arc<Vec<InputValueDefinition, Global>, Global>, key1: DirectiveLocation ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_object_type_definitions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_extensions(&self) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_subscription_operations( &self, key0: Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_query_operations( &self, key0: Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_mutation_operations( &self, key0: Arc<Vec<Arc<OperationDefinition, Global>, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_object_type_definition( &self, key0: Arc<ObjectTypeDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_field_definitions( &self, key0: Vec<FieldDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_field_definition( &self, key0: FieldDefinition ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_field( &self, key0: Arc<Field, Global>, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_leaf_field_selection( &self, key0: Arc<Field, Global>, key1: Type ) -> Result<(), ApolloDiagnostic>

source§

fn validate_arguments_definition( &self, key0: ArgumentsDefinition, key1: DirectiveLocation ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_arguments( &self, key0: Vec<Argument, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_operation_definitions( &self, key0: FileId ) -> Vec<ApolloDiagnostic, Global>

source§

fn get_possible_types( &self, key0: TypeDefinition ) -> Vec<TypeDefinition, Global>

Given a type definition, find all the types that can be used for fragment spreading. Read more
source§

fn validate_fragment_selection( &self, key0: FragmentSelection ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_fragment_spread( &self, key0: Arc<FragmentSpread, Global>, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_inline_fragment( &self, key0: Arc<InlineFragment, Global>, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_fragment_definition( &self, key0: Arc<FragmentDefinition, Global>, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_fragment_cycles( &self, key0: Arc<FragmentDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_fragment_type_condition( &self, key0: String, key1: HirNodeLocation ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_fragment_used( &self, key0: Arc<FragmentDefinition, Global>, key1: FileId ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_selection_set( &self, key0: SelectionSet, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_selection( &self, key0: Arc<Vec<Selection, Global>, Global>, key1: Arc<Vec<VariableDefinition, Global>, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_variable_definitions( &self, key0: Vec<VariableDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_unused_variable( &self, key0: Arc<OperationDefinition, Global> ) -> Vec<ApolloDiagnostic, Global>

source§

fn validate_variable_usage( &self, key0: InputValueDefinition, key1: Arc<Vec<VariableDefinition, Global>, Global>, key2: Argument ) -> Result<(), ApolloDiagnostic>

source§

fn validate_values( &self, key0: &Type, key1: &Argument, key2: Arc<Vec<VariableDefinition, Global>, Global> ) -> Result<(), Vec<ApolloDiagnostic, Global>>

source§

fn same_response_shape( &self, key0: Arc<Field, Global>, key1: Arc<Field, Global> ) -> Result<(), ApolloDiagnostic>

Check if two fields will output the same type. Read more
source§

fn fields_in_set_can_merge( &self, key0: SelectionSet ) -> Result<(), Vec<ApolloDiagnostic, Global>>

Check if the fields in a given selection set can be merged. Read more