pub struct ArenaScope<'a> { /* private fields */ }Expand description
A scope for allocating within an arena.
All allocations made through this scope are freed when the scope ends.
Implementations§
Source§impl<'a> ArenaScope<'a>
impl<'a> ArenaScope<'a>
Sourcepub fn alloc_slice<T: Copy>(&self, slice: &[T]) -> &'a [T]
pub fn alloc_slice<T: Copy>(&self, slice: &[T]) -> &'a [T]
Allocate a slice in the arena.
Sourcepub fn alloc_slice_iter<T, I>(&self, iter: I) -> &'a [T]
pub fn alloc_slice_iter<T, I>(&self, iter: I) -> &'a [T]
Allocate a slice from an iterator.
Sourcepub fn eq<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn eq<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create an equality filter.
Sourcepub fn ne<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn ne<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a not-equals filter.
Sourcepub fn lt<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn lt<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a less-than filter.
Sourcepub fn lte<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn lte<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a less-than-or-equal filter.
Sourcepub fn gt<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn gt<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a greater-than filter.
Sourcepub fn gte<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn gte<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a greater-than-or-equal filter.
Sourcepub fn is_in(
&self,
field: &str,
values: Vec<ScopedValue<'a>>,
) -> ScopedFilter<'a>
pub fn is_in( &self, field: &str, values: Vec<ScopedValue<'a>>, ) -> ScopedFilter<'a>
Create an IN filter.
Sourcepub fn not_in(
&self,
field: &str,
values: Vec<ScopedValue<'a>>,
) -> ScopedFilter<'a>
pub fn not_in( &self, field: &str, values: Vec<ScopedValue<'a>>, ) -> ScopedFilter<'a>
Create a NOT IN filter.
Sourcepub fn contains<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn contains<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a CONTAINS filter.
Sourcepub fn starts_with<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn starts_with<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create a STARTS WITH filter.
Sourcepub fn ends_with<V: Into<ScopedValue<'a>>>(
&self,
field: &str,
value: V,
) -> ScopedFilter<'a>
pub fn ends_with<V: Into<ScopedValue<'a>>>( &self, field: &str, value: V, ) -> ScopedFilter<'a>
Create an ENDS WITH filter.
Sourcepub fn is_null(&self, field: &str) -> ScopedFilter<'a>
pub fn is_null(&self, field: &str) -> ScopedFilter<'a>
Create an IS NULL filter.
Sourcepub fn is_not_null(&self, field: &str) -> ScopedFilter<'a>
pub fn is_not_null(&self, field: &str) -> ScopedFilter<'a>
Create an IS NOT NULL filter.
Sourcepub fn and(&self, filters: Vec<ScopedFilter<'a>>) -> ScopedFilter<'a>
pub fn and(&self, filters: Vec<ScopedFilter<'a>>) -> ScopedFilter<'a>
Combine filters with AND.
Sourcepub fn or(&self, filters: Vec<ScopedFilter<'a>>) -> ScopedFilter<'a>
pub fn or(&self, filters: Vec<ScopedFilter<'a>>) -> ScopedFilter<'a>
Combine filters with OR.
Sourcepub fn not(&self, filter: ScopedFilter<'a>) -> ScopedFilter<'a>
pub fn not(&self, filter: ScopedFilter<'a>) -> ScopedFilter<'a>
Negate a filter.
Sourcepub fn build_select(&self, table: &str, filter: ScopedFilter<'a>) -> String
pub fn build_select(&self, table: &str, filter: ScopedFilter<'a>) -> String
Build a SELECT query string.
Sourcepub fn build_select_columns(
&self,
table: &str,
columns: &[&str],
filter: ScopedFilter<'a>,
) -> String
pub fn build_select_columns( &self, table: &str, columns: &[&str], filter: ScopedFilter<'a>, ) -> String
Build a SELECT query with specific columns.
Sourcepub fn build_query(&self, query: &ScopedQuery<'a>) -> String
pub fn build_query(&self, query: &ScopedQuery<'a>) -> String
Build a complete query with all parts.
Sourcepub fn query(&self, table: &str) -> ScopedQuery<'a>
pub fn query(&self, table: &str) -> ScopedQuery<'a>
Create a new query builder.
Auto Trait Implementations§
impl<'a> Freeze for ArenaScope<'a>
impl<'a> !RefUnwindSafe for ArenaScope<'a>
impl<'a> !Send for ArenaScope<'a>
impl<'a> !Sync for ArenaScope<'a>
impl<'a> Unpin for ArenaScope<'a>
impl<'a> !UnwindSafe for ArenaScope<'a>
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