pub struct QueryBuilder<T> { /* private fields */ }Implementations§
Source§impl<T> QueryBuilder<T>
impl<T> QueryBuilder<T>
pub fn new(client: AuraClient, base_path: String) -> Self
pub fn select(self, columns: &str) -> Self
pub fn eq<V: Serialize>(self, column: &str, value: V) -> Self
pub fn neq<V: Serialize>(self, column: &str, value: V) -> Self
pub fn gt<V: Serialize>(self, column: &str, value: V) -> Self
pub fn gte<V: Serialize>(self, column: &str, value: V) -> Self
pub fn lt<V: Serialize>(self, column: &str, value: V) -> Self
pub fn lte<V: Serialize>(self, column: &str, value: V) -> Self
pub fn like(self, column: &str, pattern: &str) -> Self
pub fn ilike(self, column: &str, pattern: &str) -> Self
pub fn is(self, column: &str, value: &str) -> Self
pub fn in<V: Serialize>(self, column: &str, values: Vec<V>) -> Self
Sourcepub fn or(self, filters: Vec<StoredFilter>) -> Self
pub fn or(self, filters: Vec<StoredFilter>) -> Self
Ajoute un groupe OR de filtres.
pub fn order(self, column: &str, direction: &str) -> Self
pub fn limit(self, n: u64) -> Self
pub fn offset(self, n: u64) -> Self
Sourcepub fn cursor(self, cursor: impl Into<String>) -> Self
pub fn cursor(self, cursor: impl Into<String>) -> Self
Pagination keyset : passer le next_cursor opaque de la page précédente (préférable à
offset sur les grandes tables : stable, sans dup/skip). Renvoyer tel quel meta.next_cursor ;
ne pas le construire/parser (format opaque).
pub fn count(self, mode: CountMode) -> Self
pub fn throw_on_error(self) -> Self
pub fn insert<V: Serialize>(self, body: V) -> Self
pub fn update<V: Serialize>(self, id: &str, body: V) -> Self
pub fn delete(self, id: &str) -> Self
pub fn upsert<V: Serialize>(self, body: V, on_conflict: Option<&str>) -> Self
pub fn build_query_string(&self) -> String
Source§impl<Row> QueryBuilder<Vec<Row>>
impl<Row> QueryBuilder<Vec<Row>>
pub fn single(self) -> QueryBuilder<Row>
Source§impl<T> QueryBuilder<T>
impl<T> QueryBuilder<T>
pub async fn execute(self) -> Result<AuraResponse<T>, AuraError>
Trait Implementations§
Source§impl<T> IntoFuture for QueryBuilder<T>
impl<T> IntoFuture for QueryBuilder<T>
Source§type Output = Result<AuraResponse<T>, AuraError>
type Output = Result<AuraResponse<T>, AuraError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <QueryBuilder<T> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <QueryBuilder<T> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<T> !RefUnwindSafe for QueryBuilder<T>
impl<T> !UnwindSafe for QueryBuilder<T>
impl<T> Freeze for QueryBuilder<T>where
PhantomData<T>: Freeze,
impl<T> Send for QueryBuilder<T>where
PhantomData<T>: Send,
impl<T> Sync for QueryBuilder<T>where
PhantomData<T>: Sync,
impl<T> Unpin for QueryBuilder<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for QueryBuilder<T>where
PhantomData<T>: UnsafeUnpin,
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