Enum query_structure::Field
source · pub enum Field {
Relation(RelationFieldRef),
Scalar(ScalarFieldRef),
Composite(CompositeFieldRef),
}
Variants§
Implementations§
source§impl Field
impl Field
pub fn borrowed_name<'a>(&self, schema: &'a ValidatedSchema) -> &'a str
pub fn name(&self) -> &str
pub fn db_name(&self) -> &str
pub fn is_scalar(&self) -> bool
pub fn is_relation(&self) -> bool
pub fn is_composite(&self) -> bool
pub fn into_scalar(self) -> Option<ScalarFieldRef>
pub fn is_id(&self) -> bool
pub fn is_list(&self) -> bool
pub fn is_required(&self) -> bool
pub fn is_unique(&self) -> bool
pub fn model(&self) -> Option<Model>
pub fn scalar_fields(&self) -> Vec<ScalarFieldRef>
pub fn as_composite(&self) -> Option<&CompositeFieldRef>
pub fn as_scalar(&self) -> Option<&ScalarFieldRef>
Trait Implementations§
source§impl From<(InternalDataModel, Walker<'_, (CompositeTypeId, FieldId)>)> for Field
impl From<(InternalDataModel, Walker<'_, (CompositeTypeId, FieldId)>)> for Field
source§fn from((dm, sf): (InternalDataModel, CompositeTypeFieldWalker<'_>)) -> Self
fn from((dm, sf): (InternalDataModel, CompositeTypeFieldWalker<'_>)) -> Self
Converts to this type from the input type.
source§impl From<(InternalDataModel, Walker<'_, RelationFieldId>)> for Field
impl From<(InternalDataModel, Walker<'_, RelationFieldId>)> for Field
source§fn from((dm, rf): (InternalDataModel, RelationFieldWalker<'_>)) -> Self
fn from((dm, rf): (InternalDataModel, RelationFieldWalker<'_>)) -> Self
Converts to this type from the input type.
source§impl From<(InternalDataModel, Walker<'_, ScalarFieldId>)> for Field
impl From<(InternalDataModel, Walker<'_, ScalarFieldId>)> for Field
source§fn from((dm, sf): (InternalDataModel, ScalarFieldWalker<'_>)) -> Self
fn from((dm, sf): (InternalDataModel, ScalarFieldWalker<'_>)) -> Self
Converts to this type from the input type.
source§impl From<Field> for ModelProjection
impl From<Field> for ModelProjection
source§impl From<Zipper<CompositeFieldId>> for Field
impl From<Zipper<CompositeFieldId>> for Field
source§fn from(cf: CompositeFieldRef) -> Self
fn from(cf: CompositeFieldRef) -> Self
Converts to this type from the input type.
source§impl From<Zipper<RelationFieldId>> for Field
impl From<Zipper<RelationFieldId>> for Field
source§fn from(rf: RelationFieldRef) -> Self
fn from(rf: RelationFieldRef) -> Self
Converts to this type from the input type.
source§impl From<Zipper<ScalarFieldId>> for Field
impl From<Zipper<ScalarFieldId>> for Field
source§fn from(sf: ScalarFieldRef) -> Self
fn from(sf: ScalarFieldRef) -> Self
Converts to this type from the input type.
source§impl PartialEq for Field
impl PartialEq for Field
impl Eq for Field
impl StructuralEq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl !RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl !UnwindSafe for Field
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.