Struct query_structure::prelude::Record
source · pub struct Record {
pub values: Vec<PrismaValue>,
pub parent_id: Option<SelectionResult>,
}
Fields§
§values: Vec<PrismaValue>
§parent_id: Option<SelectionResult>
Implementations§
source§impl Record
impl Record
pub fn new(values: Vec<PrismaValue>) -> Record
sourcepub fn extract_selection_result(
&self,
field_names: &[String],
extraction_selection: &FieldSelection
) -> Result<SelectionResult>
pub fn extract_selection_result( &self, field_names: &[String], extraction_selection: &FieldSelection ) -> Result<SelectionResult>
Extract a SelectionResult
from this Record
field_names
: Database names of the fields contained in this Record
.
selected_fields
: The selection to extract.
pub fn identifying_values( &self, field_names: &[String], model_projection: &ModelProjection ) -> Result<Vec<&PrismaValue>>
pub fn get_field_value( &self, field_names: &[String], field: &str ) -> Result<&PrismaValue>
pub fn set_parent_id(&mut self, parent_id: SelectionResult)
Trait Implementations§
source§impl From<SelectionResult> for Record
impl From<SelectionResult> for Record
source§fn from(selection_result: SelectionResult) -> Self
fn from(selection_result: SelectionResult) -> Self
Converts to this type from the input type.
source§impl PartialEq for Record
impl PartialEq for Record
impl Eq for Record
impl StructuralEq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl !RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl !UnwindSafe for Record
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
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.