pub struct ExecutionContext { /* private fields */ }Expand description
Execution context for procedural statements
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn with_recursion_depth(depth: usize) -> Self
pub fn with_recursion_depth(depth: usize) -> Self
Create a new context with specified recursion depth
Sourcepub fn set_variable(&mut self, name: &str, value: SqlValue)
pub fn set_variable(&mut self, name: &str, value: SqlValue)
Set a local variable value
Sourcepub fn get_variable(&self, name: &str) -> Option<&SqlValue>
pub fn get_variable(&self, name: &str) -> Option<&SqlValue>
Get a local variable value
Sourcepub fn has_variable(&self, name: &str) -> bool
pub fn has_variable(&self, name: &str) -> bool
Check if a variable exists
Sourcepub fn set_parameter(&mut self, name: &str, value: SqlValue)
pub fn set_parameter(&mut self, name: &str, value: SqlValue)
Set a parameter value
Sourcepub fn get_parameter(&self, name: &str) -> Option<&SqlValue>
pub fn get_parameter(&self, name: &str) -> Option<&SqlValue>
Get a parameter value
Sourcepub fn get_parameter_mut(&mut self, name: &str) -> Option<&mut SqlValue>
pub fn get_parameter_mut(&mut self, name: &str) -> Option<&mut SqlValue>
Get a mutable reference to a parameter value
Sourcepub fn has_parameter(&self, name: &str) -> bool
pub fn has_parameter(&self, name: &str) -> bool
Check if a parameter exists
Sourcepub fn push_label(&mut self, label: &str)
pub fn push_label(&mut self, label: &str)
Push a label onto the stack
Sourcepub fn enter_recursion(&mut self) -> Result<(), String>
pub fn enter_recursion(&mut self) -> Result<(), String>
Increment recursion depth and check limit
Sourcepub fn exit_recursion(&mut self)
pub fn exit_recursion(&mut self)
Decrement recursion depth
Sourcepub fn recursion_depth(&self) -> usize
pub fn recursion_depth(&self) -> usize
Get current recursion depth
Sourcepub fn get_all_parameters(&self) -> &HashMap<String, SqlValue>
pub fn get_all_parameters(&self) -> &HashMap<String, SqlValue>
Get all parameters (for OUT/INOUT return)
Sourcepub fn register_out_parameter(
&mut self,
param_name: &str,
target_var_name: String,
)
pub fn register_out_parameter( &mut self, param_name: &str, target_var_name: String, )
Register an OUT or INOUT parameter with its target variable name
Sourcepub fn get_out_parameters(&self) -> &HashMap<String, String>
pub fn get_out_parameters(&self) -> &HashMap<String, String>
Get all OUT/INOUT parameters for return Returns a HashMap of parameter name -> target variable name
Sourcepub fn get_available_names(&self) -> Vec<String>
pub fn get_available_names(&self) -> Vec<String>
Get all available variable and parameter names (for error messages)
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn new_function_context() -> Self
pub fn new_function_context() -> Self
Create a new function execution context (read-only)
Sourcepub fn is_function_context(&self) -> bool
pub fn is_function_context(&self) -> bool
Check if this is a function context (read-only)
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more