Struct query_structure::prelude::ManyRecords
source · pub struct ManyRecords {
pub records: Vec<Record>,
pub field_names: Vec<String>,
}
Fields§
§records: Vec<Record>
§field_names: Vec<String>
Implementations§
source§impl ManyRecords
impl ManyRecords
pub fn new(field_names: Vec<String>) -> Self
pub fn empty(selected_fields: &FieldSelection) -> Self
pub fn order_by(&mut self, order_bys: &[OrderBy], reversed: bool)
pub fn push(&mut self, record: Record)
sourcepub fn extract_selection_results(
&self,
selections: &FieldSelection
) -> Result<Vec<SelectionResult>>
pub fn extract_selection_results( &self, selections: &FieldSelection ) -> Result<Vec<SelectionResult>>
Builds SelectionResults
from this ManyRecords
based on the given FieldSelection.
sourcepub fn as_pairs(&self) -> Vec<Vec<(String, PrismaValue)>>
pub fn as_pairs(&self) -> Vec<Vec<(String, PrismaValue)>>
Maps into a Vector of (field_name, value) tuples
sourcepub fn with_unique_records(self) -> Self
pub fn with_unique_records(self) -> Self
Deduplicate the wrapped records
Trait Implementations§
source§impl Clone for ManyRecords
impl Clone for ManyRecords
source§fn clone(&self) -> ManyRecords
fn clone(&self) -> ManyRecords
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ManyRecords
impl Debug for ManyRecords
source§impl Default for ManyRecords
impl Default for ManyRecords
source§fn default() -> ManyRecords
fn default() -> ManyRecords
Returns the “default value” for a type. Read more
source§impl From<(Vec<Vec<PrismaValue>>, &FieldSelection)> for ManyRecords
impl From<(Vec<Vec<PrismaValue>>, &FieldSelection)> for ManyRecords
source§fn from(
(values, selected_fields): (Vec<Vec<PrismaValue>>, &FieldSelection)
) -> Self
fn from( (values, selected_fields): (Vec<Vec<PrismaValue>>, &FieldSelection) ) -> Self
Converts to this type from the input type.
source§impl From<SingleRecord> for ManyRecords
impl From<SingleRecord> for ManyRecords
source§fn from(single: SingleRecord) -> ManyRecords
fn from(single: SingleRecord) -> ManyRecords
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ManyRecords
impl Send for ManyRecords
impl Sync for ManyRecords
impl Unpin for ManyRecords
impl !UnwindSafe for ManyRecords
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