Struct query_structure::walkers::PrimaryKeyWalker
source · pub struct PrimaryKeyWalker<'db> { /* private fields */ }
Expand description
An @(@)id
attribute in the schema.
Implementations§
source§impl<'db> PrimaryKeyWalker<'db>
impl<'db> PrimaryKeyWalker<'db>
sourcepub fn ast_attribute(self) -> &'db Attribute
pub fn ast_attribute(self) -> &'db Attribute
The @(@)id
AST node.
sourcepub fn mapped_name(self) -> Option<&'db str>
pub fn mapped_name(self) -> Option<&'db str>
The mapped name of the id.
ⓘ
@@id([a, b], map: "theName")
^^^^^^^^^
sourcepub fn is_defined_on_field(self) -> bool
pub fn is_defined_on_field(self) -> bool
Is this an @id
on a specific field, rather than on the model?
sourcepub fn attribute_name(self) -> &'static str
pub fn attribute_name(self) -> &'static str
If defined on a specific field, returns @id
. Otherwise @@id
.
sourcepub fn clustered(self) -> Option<bool>
pub fn clustered(self) -> Option<bool>
If true, the index defines the storage and ordering of the row. Mostly matters on SQL Server where one can change the clustering.
sourcepub fn name(self) -> Option<&'db str>
pub fn name(self) -> Option<&'db str>
The name
argument of the id attribute. The client name.
ⓘ
@@id([a, b], name: "theName")
^^^^^^^^^
sourcepub fn fields(self) -> impl ExactSizeIterator + Clone + 'db
pub fn fields(self) -> impl ExactSizeIterator + Clone + 'db
The scalar fields constrained by the id.
sourcepub fn scalar_field_attributes(self) -> impl ExactSizeIterator + 'db
pub fn scalar_field_attributes(self) -> impl ExactSizeIterator + 'db
The scalar fields covered by the id, and their arguments.
sourcepub fn contains_exactly_fields(
self,
fields: impl ExactSizeIterator<Item = Walker<'db, ScalarFieldId>>
) -> bool
pub fn contains_exactly_fields( self, fields: impl ExactSizeIterator<Item = Walker<'db, ScalarFieldId>> ) -> bool
Do the constrained fields match exactly these?
Trait Implementations§
source§impl<'db> Clone for PrimaryKeyWalker<'db>
impl<'db> Clone for PrimaryKeyWalker<'db>
source§fn clone(&self) -> PrimaryKeyWalker<'db>
fn clone(&self) -> PrimaryKeyWalker<'db>
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<'db> PrimaryKeyWalkerExt<'db> for PrimaryKeyWalker<'db>
impl<'db> PrimaryKeyWalkerExt<'db> for PrimaryKeyWalker<'db>
impl<'db> Copy for PrimaryKeyWalker<'db>
Auto Trait Implementations§
impl<'db> RefUnwindSafe for PrimaryKeyWalker<'db>
impl<'db> Send for PrimaryKeyWalker<'db>
impl<'db> Sync for PrimaryKeyWalker<'db>
impl<'db> Unpin for PrimaryKeyWalker<'db>
impl<'db> UnwindSafe for PrimaryKeyWalker<'db>
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