pub struct SessionRow {
pub id: String,
pub payload: String,
pub expires_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A session row.
Fields§
§id: StringThe session id — the primary key, so a read is a point lookup.
payload: StringThe bag, as JSON.
expires_at: DateTime<Utc>When this row stops being valid.
updated_at: DateTime<Utc>When it was last written, for diagnostics.
Trait Implementations§
Source§impl Clone for SessionRow
impl Clone for SessionRow
Source§impl Debug for SessionRow
impl Debug for SessionRow
Source§impl Entity for SessionRow
impl Entity for SessionRow
Source§fn columns() -> &'static [ColumnSpec]
fn columns() -> &'static [ColumnSpec]
Column metadata, in declaration order. Drives both DDL generation and
the column list of generated
INSERTs.Source§fn primary_key() -> &'static str
fn primary_key() -> &'static str
The primary-key column name. Used by
find_by_pk / update /
delete_by_pk.Source§fn indexes() -> &'static [IndexSpec]
fn indexes() -> &'static [IndexSpec]
Secondary indexes (single-column and composite, unique or not),
emitted as separate
CREATE INDEX statements by crate::schema.
Defaults to none.Source§fn foreign_keys() -> &'static [ForeignKeySpec]
fn foreign_keys() -> &'static [ForeignKeySpec]
Foreign-key constraints, emitted inline in the
CREATE TABLE. These
enforce referential integrity within one database; they are not ORM
relationships (no navigation is generated). Defaults to none.Source§fn shard_columns() -> &'static [&'static str]
fn shard_columns() -> &'static [&'static str]
Columns whose values are the shard key — a shard-encoded id
(
#[orm(shard_key)]), the “user id by proxy”. When a query constrains
one of these, the repo layer routes the operation to that id’s shard. Read moreSource§fn from_row(row: &dyn Row) -> Result<Self, Error>
fn from_row(row: &dyn Row) -> Result<Self, Error>
Decode one row into
Self. Generated to read each field through its
FromColumn impl.Source§fn insert_values(&self) -> Vec<(&'static str, Value)>
fn insert_values(&self) -> Vec<(&'static str, Value)>
(column, value) pairs for an INSERT. Auto-increment primary keys
are omitted so the database assigns them.Source§impl Model for SessionRow
impl Model for SessionRow
Source§fn model_name() -> &'static str
fn model_name() -> &'static str
The model’s name, for error messages —
"Post".Source§fn route_key_name() -> &'static str
fn route_key_name() -> &'static str
The column route-model binding looks a member up by. Read more
Source§impl PartialEq for SessionRow
impl PartialEq for SessionRow
impl StructuralPartialEq for SessionRow
Auto Trait Implementations§
impl Freeze for SessionRow
impl RefUnwindSafe for SessionRow
impl Send for SessionRow
impl Sync for SessionRow
impl Unpin for SessionRow
impl UnsafeUnpin for SessionRow
impl UnwindSafe for SessionRow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Event for T
impl<T> Event for T
Source§fn event_name() -> &'static strwhere
Self: Sized,
fn event_name() -> &'static strwhere
Self: Sized,
A human-readable name, used by wildcard listeners and log output.
Always the Rust type path; see the trait docs.