Struct prql_compiler::semantic::Context
source · pub struct Context { /* private fields */ }Expand description
Context of the pipeline.
Implementations§
source§impl Context
impl Context
pub fn declare_func(&mut self, func_def: FuncDef, id: Option<usize>)
pub fn declare_var( &mut self, var_def: VarDef, id: Option<usize>, span: Option<Span> ) -> Result<()>
pub fn resolve_ident(&mut self, ident: &Ident) -> Result<Ident, String>
sourcepub fn table_decl_to_frame(
&self,
table_fq: &Ident,
input_name: String,
input_id: usize
) -> Frame
pub fn table_decl_to_frame( &self, table_fq: &Ident, input_name: String, input_id: usize ) -> Frame
Converts a identifier that points to a table declaration to a frame of that table.
sourcepub fn declare_table_for_literal(
&mut self,
input_id: usize,
columns: Option<Vec<RelationColumn>>,
name_hint: Option<String>
) -> Frame
pub fn declare_table_for_literal( &mut self, input_id: usize, columns: Option<Vec<RelationColumn>>, name_hint: Option<String> ) -> Frame
Declares a new table for a relation literal. This is needed for column inference to work properly.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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