pub struct NativeQueryBuilder { /* private fields */ }
Expand description
Builder for creating NativeQuery instances
Implementations§
Source§impl NativeQueryBuilder
impl NativeQueryBuilder
Sourcepub fn add_param(self, name: &str, param_type: &str, value: Value) -> Self
pub fn add_param(self, name: &str, param_type: &str, value: Value) -> Self
Adds a generic parameter
Sourcepub fn add_text_param(self, name: &str, value: &str) -> Self
pub fn add_text_param(self, name: &str, value: &str) -> Self
Adds a text parameter
Sourcepub fn add_number_param(self, name: &str, value: f64) -> Self
pub fn add_number_param(self, name: &str, value: f64) -> Self
Adds a number parameter
Sourcepub fn add_date_param(self, name: &str, value: &str) -> Self
pub fn add_date_param(self, name: &str, value: &str) -> Self
Adds a date parameter
Sourcepub fn with_params(self, params: HashMap<String, Value>) -> Self
pub fn with_params(self, params: HashMap<String, Value>) -> Self
Adds parameters from a HashMap
Sourcepub fn collection(self, collection: impl Into<String>) -> Self
pub fn collection(self, collection: impl Into<String>) -> Self
Sets the collection
Sourcepub fn build(self) -> NativeQuery
pub fn build(self) -> NativeQuery
Builds the NativeQuery
Auto Trait Implementations§
impl Freeze for NativeQueryBuilder
impl RefUnwindSafe for NativeQueryBuilder
impl Send for NativeQueryBuilder
impl Sync for NativeQueryBuilder
impl Unpin for NativeQueryBuilder
impl UnwindSafe for NativeQueryBuilder
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