Struct prql_compiler::ir::decl::RootModule
source · pub struct RootModule {
pub module: Module,
pub span_map: HashMap<usize, Span>,
}
Expand description
Context of the pipeline.
Fields§
§module: Module
Map of all accessible names (for each namespace)
span_map: HashMap<usize, Span>
Implementations§
source§impl RootModule
impl RootModule
sourcepub fn find_main_rel(
&self,
path: &[String]
) -> Result<(&TableExpr, Ident), (Option<String>, Option<Span>)>
pub fn find_main_rel( &self, path: &[String] ) -> Result<(&TableExpr, Ident), (Option<String>, Option<Span>)>
Finds that main pipeline given a path to either main itself or its parent module. Returns main expr and fq ident of the decl.
pub fn find_main( &self, path: &[String] ) -> Result<(&Decl, Ident), Option<String>>
pub fn find_query_def(&self, main: &Ident) -> Option<&QueryDef>
sourcepub fn find_mains(&self) -> Vec<Ident>
pub fn find_mains(&self) -> Vec<Ident>
Finds all main pipelines.
sourcepub fn find_by_annotation_name(&self, annotation_name: &Ident) -> Vec<Ident>
pub fn find_by_annotation_name(&self, annotation_name: &Ident) -> Vec<Ident>
Finds declarations that are annotated with a specific name.
Trait Implementations§
source§impl Clone for RootModule
impl Clone for RootModule
source§fn clone(&self) -> RootModule
fn clone(&self) -> RootModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RootModule
impl Debug for RootModule
source§impl Default for RootModule
impl Default for RootModule
source§fn default() -> RootModule
fn default() -> RootModule
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RootModule
impl<'de> Deserialize<'de> for RootModule
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RootModule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<RootModule, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for RootModule
impl Serialize for RootModule
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RootModule
impl Send for RootModule
impl Sync for RootModule
impl Unpin for RootModule
impl UnwindSafe for RootModule
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
Mutably borrows from an owned value. Read more