pub struct QueryOptions {
pub limit: Option<u32>,
pub skip: Option<u32>,
pub order: Vec<(String, SortDirection)>,
pub keys: Option<Vec<String>>,
pub case_insensitive: bool,
}Expand description
Everything about a read that is not a constraint.
Fields§
§limit: Option<u32>§skip: Option<u32>§order: Vec<(String, SortDirection)>§keys: Option<Vec<String>>Projection. None means every field; Some is the explicit list.
Upstream converts excludeKeys into keys before it reaches storage, so an adapter only
ever sees the positive form.
case_insensitive: boolCompare strings under upstream’s case-insensitive collation rather than byte for byte.
{caseInsensitive: true} (MongoStorageAdapter.js:723, :801-803), which resolves to
{locale: "en_US", strength: 2}. Used by the _User username and email uniqueness checks
and by nothing else, because it is the only place upstream asks for it.
A case-folding regex is not a substitute and the difference is not academic. Strength 2
normalizes as well as folding case, so a precomposed Café and a decomposed Café are one
key to the collation and two distinct byte strings to any regex, which means a regex admits
identities upstream treats as duplicates. It does not fold diacritics: Café and Cafe
remain different identities under it.
Implementations§
Source§impl QueryOptions
impl QueryOptions
Sourcepub fn parse_order(order: &str) -> Vec<(String, SortDirection)>
pub fn parse_order(order: &str) -> Vec<(String, SortDirection)>
Parse Parse’s order parameter: comma-separated keys, - prefix for descending.
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more