bookclerk_library::entities::destination_objects

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

SeaORM entity for destination_objects: the last known state of every object at each output destination (storage destinations ADR, docs/adr/storage-destinations.md, decision 5).

Written by the destination sync pass from the destination's change feed and its scheduled listing (crate::LibraryStore::record_seen_objects, crate::LibraryStore::remove_seen_objects, crate::LibraryStore::finish_listing); read by the readers that act on outside changes, which page the rows changed since a sequence number (crate::LibraryStore::changed_objects).

Item Kind Summary
Model struct Row shape for this table (DeriveEntityModel).
ColumnIter struct An iterator over the variants of [Column]
Entity struct Generated by sea-orm-macros
PrimaryKeyIter struct An iterator over the variants of [PrimaryKey]
ActiveModel struct Generated by sea-orm-macros
RelationIter struct An iterator over the variants of [Relation]
Column enum Generated by sea-orm-macros
PrimaryKey enum Generated by sea-orm-macros
Relation enum Declared SeaORM relations (none unless FK edges are modeled).

Structs

Model

pub struct Model {
    pub destination: String,
    pub object_key: String,
    pub size: i64,
    pub signature: Option<String>,
    pub modified_at_ms: Option<i64>,
    pub listed_seq: i64,
    pub changed_seq: i64,
    pub removed: i64,
    pub changed_at: String,
}

Row shape for this table (DeriveEntityModel).

Fields

  • destination: The destination's plugin instance id.
  • object_key: The object's key at the destination, as its listing names it.
  • size: Object size in bytes when last seen.
  • signature: The backend's opaque change signature (or entity tag) when last seen; None when the backend gave neither.
  • modified_at_ms: Last modification time in UTC unix milliseconds, when known.
  • listed_seq: The destination's change sequence of the last listing or feed page that saw the object.
  • changed_seq: The destination's change sequence when the row last changed (added, modified or removed).
  • removed: 1 once the object is gone (a tombstone kept for readers that page changes), else 0.
  • changed_at: RFC 3339 time the row last changed.

Model::into_ex

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Implements: Clone, Debug, Eq, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

ColumnIter

pub struct ColumnIter {
    /* private fields */
}

An iterator over the variants of Column

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Entity

pub struct Entity;

Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic

PrimaryKeyIter

pub struct PrimaryKeyIter {
    /* private fields */
}

An iterator over the variants of PrimaryKey

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

ActiveModel

pub struct ActiveModel {
    pub destination: ActiveValue<String>,
    pub object_key: ActiveValue<String>,
    pub size: ActiveValue<i64>,
    pub signature: ActiveValue<Option<String>>,
    pub modified_at_ms: ActiveValue<Option<i64>>,
    pub listed_seq: ActiveValue<i64>,
    pub changed_seq: ActiveValue<i64>,
    pub removed: ActiveValue<i64>,
    pub changed_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • destination: Generated by sea-orm-macros
  • object_key: Generated by sea-orm-macros
  • size: Generated by sea-orm-macros
  • signature: Generated by sea-orm-macros
  • modified_at_ms: Generated by sea-orm-macros
  • listed_seq: Generated by sea-orm-macros
  • changed_seq: Generated by sea-orm-macros
  • removed: Generated by sea-orm-macros
  • changed_at: Generated by sea-orm-macros

Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

RelationIter

pub struct RelationIter {
    /* private fields */
}

An iterator over the variants of Relation

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Enums

Column

pub enum Column {
    Destination,
    ObjectKey,
    Size,
    Signature,
    ModifiedAtMs,
    ListedSeq,
    ChangedSeq,
    Removed,
    ChangedAt,
}

Generated by sea-orm-macros

Variants

  • Destination: Generated by sea-orm-macros
  • ObjectKey: Generated by sea-orm-macros
  • Size: Generated by sea-orm-macros
  • Signature: Generated by sea-orm-macros
  • ModifiedAtMs: Generated by sea-orm-macros
  • ListedSeq: Generated by sea-orm-macros
  • ChangedSeq: Generated by sea-orm-macros
  • Removed: Generated by sea-orm-macros
  • ChangedAt: Generated by sea-orm-macros

Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator

PrimaryKey

pub enum PrimaryKey {
    Destination,
    ObjectKey,
}

Generated by sea-orm-macros

Variants

  • Destination: Generated by sea-orm-macros
  • ObjectKey: Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait

Relation

pub enum Relation {}

Declared SeaORM relations (none unless FK edges are modeled).

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

Generated from crates/bookclerk-library at main · View as Markdown