pub struct PreparedQueryBuilder { /* private fields */ }Expand description
Prepared statement builder
Implementations§
Source§impl PreparedQueryBuilder
impl PreparedQueryBuilder
Sourcepub fn parameter(
self,
name: Option<String>,
data_type: DataType,
optional: bool,
) -> Self
pub fn parameter( self, name: Option<String>, data_type: DataType, optional: bool, ) -> Self
Add a parameter
Sourcepub fn positional_parameter(self, data_type: DataType) -> Self
pub fn positional_parameter(self, data_type: DataType) -> Self
Add a positional parameter
Sourcepub fn named_parameter(
self,
name: &str,
data_type: DataType,
optional: bool,
) -> Self
pub fn named_parameter( self, name: &str, data_type: DataType, optional: bool, ) -> Self
Add a named parameter
Sourcepub fn hints(self, hints: ExecutionHints) -> Self
pub fn hints(self, hints: ExecutionHints) -> Self
Set execution hints
Sourcepub fn force_index(self, index_name: &str) -> Self
pub fn force_index(self, index_name: &str) -> Self
Force index usage
Sourcepub fn parallelism(self, threads: usize) -> Self
pub fn parallelism(self, threads: usize) -> Self
Set parallelism preference
Sourcepub fn cache_results(self) -> Self
pub fn cache_results(self) -> Self
Enable result caching
Sourcepub fn build(
self,
parsed_query: ParsedQuery,
plan: QueryPlan,
executor: Arc<QueryExecutor>,
) -> PreparedQuery
pub fn build( self, parsed_query: ParsedQuery, plan: QueryPlan, executor: Arc<QueryExecutor>, ) -> PreparedQuery
Build the prepared query (this would typically be called by the query engine)
Trait Implementations§
Source§impl Default for PreparedQueryBuilder
impl Default for PreparedQueryBuilder
Source§fn default() -> PreparedQueryBuilder
fn default() -> PreparedQueryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PreparedQueryBuilder
impl RefUnwindSafe for PreparedQueryBuilder
impl Send for PreparedQueryBuilder
impl Sync for PreparedQueryBuilder
impl Unpin for PreparedQueryBuilder
impl UnsafeUnpin for PreparedQueryBuilder
impl UnwindSafe for PreparedQueryBuilder
Blanket Implementations§
impl<T> Allocation for T
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