pub struct FindQuery {
pub selector: Value,
pub limit: Option<u64>,
pub skip: Option<u64>,
pub sort: Vec<SortSpec>,
pub fields: Option<Vec<String>>,
pub use_index: Option<IndexSpec>,
pub r: Option<i32>,
pub bookmark: Option<String>,
pub update: Option<bool>,
pub stable: Option<bool>,
pub stale: Option<String>,
pub execution_stats: Option<bool>,
}
Expand description
Find query abstraction Parameters here /db/_find
Fields§
§selector: Value
§limit: Option<u64>
§skip: Option<u64>
§sort: Vec<SortSpec>
§fields: Option<Vec<String>>
§use_index: Option<IndexSpec>
§r: Option<i32>
§bookmark: Option<String>
§update: Option<bool>
§stable: Option<bool>
§stale: Option<String>
§execution_stats: Option<bool>
Implementations§
source§impl FindQuery
impl FindQuery
Find query. You can use the builder paradigm to construct these parameters easily:
use couch_rs::types::find::FindQuery;
let _query = FindQuery::find_all().skip(10).limit(10);
pub fn new_from_value(query: Value) -> Self
pub fn new(selector: Value) -> Self
pub fn find_all() -> Self
pub fn as_value(&self) -> Value
pub fn limit(self, limit: u64) -> Self
pub fn skip(self, skip: u64) -> Self
pub fn sort(self, sort: Vec<SortSpec>) -> Self
pub fn fields(self, fields: Vec<String>) -> Self
pub fn use_index(self, use_index: IndexSpec) -> Self
pub fn r(self, r: i32) -> Self
pub fn bookmark(self, bookmark: &str) -> Self
pub fn update(self, update: bool) -> Self
pub fn stable(self, stable: bool) -> Self
pub fn stale(self, stale: &str) -> Self
pub fn execution_stats(self, execution_stats: bool) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for FindQuery
impl<'de> Deserialize<'de> for FindQuery
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for FindQuery
impl PartialEq for FindQuery
impl Eq for FindQuery
impl StructuralPartialEq for FindQuery
Auto Trait Implementations§
impl Freeze for FindQuery
impl RefUnwindSafe for FindQuery
impl Send for FindQuery
impl Sync for FindQuery
impl Unpin for FindQuery
impl UnwindSafe for FindQuery
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