pub struct PrimaryKeyModel { /* private fields */ }Expand description
PrimaryKeyModel
Ordered primary-key field metadata for one entity. The current execution engine consumes scalar projections, while this model carries the ordered field-list shape needed for composite primary keys.
Implementations§
Source§impl PrimaryKeyModel
impl PrimaryKeyModel
Sourcepub const fn scalar(field: &'static FieldModel) -> Self
pub const fn scalar(field: &'static FieldModel) -> Self
Build scalar primary-key metadata for existing generated/test models.
Sourcepub const fn ordered(fields: &'static [&'static FieldModel]) -> Self
pub const fn ordered(fields: &'static [&'static FieldModel]) -> Self
Build ordered primary-key metadata from generated field references.
Sourcepub const fn is_scalar(&self) -> bool
pub const fn is_scalar(&self) -> bool
Return whether this primary key is the scalar one-field case.
Sourcepub const fn first_field(&self) -> &'static FieldModel
pub const fn first_field(&self) -> &'static FieldModel
Return the first primary-key field.
Composite-aware code should consume fields() when it needs full row
identity. This helper exists only for metadata surfaces that still carry
one primary-key field pointer alongside ordered primary-key metadata.
Sourcepub const fn fields(&self) -> PrimaryKeyModelFields
pub const fn fields(&self) -> PrimaryKeyModelFields
Iterate over ordered primary-key fields.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrimaryKeyModel
impl RefUnwindSafe for PrimaryKeyModel
impl Send for PrimaryKeyModel
impl Sync for PrimaryKeyModel
impl Unpin for PrimaryKeyModel
impl UnsafeUnpin for PrimaryKeyModel
impl UnwindSafe for PrimaryKeyModel
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