bookclerk_library::entities::destination_feeds

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

Last updated View as Markdown

SeaORM entity for destination_feeds: how each output destination's outside changes are followed, and how healthy that is (storage destinations ADR, docs/adr/storage-destinations.md, decision 5).

One row per destination, written by the destination sync pass that holds the destination's lease (crate::LibraryStore::save_destination_feed) and read for its next pass and for the destination's health in Settings.

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 seq: i64,
    pub feed_state: String,
    pub feed_cursor: Option<String>,
    pub feed_error: Option<String>,
    pub feed_checked_at: Option<String>,
    pub listing_seq: Option<i64>,
    pub listing_cursor: Option<String>,
    pub listing_started_at: Option<String>,
    pub listed_at: Option<String>,
    pub next_listing_at: Option<String>,
    pub listing_error: Option<String>,
    pub objects: i64,
    pub checked_seq: i64,
    pub listing_base: Option<i64>,
    pub revision: i64,
    pub updated_at: String,
}

Row shape for this table (DeriveEntityModel).

Fields

  • destination: The destination's plugin instance id.
  • seq: The last change sequence number handed out for this destination.
  • feed_state: The change feed's state (FeedState::as_str): off, healthy, gap or failing.
  • feed_cursor: The feed cursor to read from next; None before the first read.
  • feed_error: The last feed failure, for operators.
  • feed_checked_at: RFC 3339 time the feed was last read.
  • listing_seq: Sequence of the listing in progress; None between listings.
  • listing_cursor: Cursor of the next page of the listing in progress.
  • listing_started_at: RFC 3339 time the listing in progress (or the last one) started.
  • listed_at: RFC 3339 time the last listing finished.
  • next_listing_at: RFC 3339 time the next scheduled listing is due.
  • listing_error: Why the last listing failed or was not applied, for operators.
  • objects: Objects the destination held at the end of the last listing or feed page.
  • checked_seq: The last sequence the copy check has read changes up to.
  • listing_base: Objects known when the listing in progress started, which its removal guard is judged against; None between listings.
  • revision: Write count of this row: each save names the revision it read and fails when another writer saved since (a sync pass whose lease another node took).
  • updated_at: RFC 3339 time the row was last written.

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 seq: ActiveValue<i64>,
    pub feed_state: ActiveValue<String>,
    pub feed_cursor: ActiveValue<Option<String>>,
    pub feed_error: ActiveValue<Option<String>>,
    pub feed_checked_at: ActiveValue<Option<String>>,
    pub listing_seq: ActiveValue<Option<i64>>,
    pub listing_cursor: ActiveValue<Option<String>>,
    pub listing_started_at: ActiveValue<Option<String>>,
    pub listed_at: ActiveValue<Option<String>>,
    pub next_listing_at: ActiveValue<Option<String>>,
    pub listing_error: ActiveValue<Option<String>>,
    pub objects: ActiveValue<i64>,
    pub checked_seq: ActiveValue<i64>,
    pub listing_base: ActiveValue<Option<i64>>,
    pub revision: ActiveValue<i64>,
    pub updated_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • destination: Generated by sea-orm-macros
  • seq: Generated by sea-orm-macros
  • feed_state: Generated by sea-orm-macros
  • feed_cursor: Generated by sea-orm-macros
  • feed_error: Generated by sea-orm-macros
  • feed_checked_at: Generated by sea-orm-macros
  • listing_seq: Generated by sea-orm-macros
  • listing_cursor: Generated by sea-orm-macros
  • listing_started_at: Generated by sea-orm-macros
  • listed_at: Generated by sea-orm-macros
  • next_listing_at: Generated by sea-orm-macros
  • listing_error: Generated by sea-orm-macros
  • objects: Generated by sea-orm-macros
  • checked_seq: Generated by sea-orm-macros
  • listing_base: Generated by sea-orm-macros
  • revision: Generated by sea-orm-macros
  • updated_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,
    Seq,
    FeedState,
    FeedCursor,
    FeedError,
    FeedCheckedAt,
    ListingSeq,
    ListingCursor,
    ListingStartedAt,
    ListedAt,
    NextListingAt,
    ListingError,
    Objects,
    CheckedSeq,
    ListingBase,
    Revision,
    UpdatedAt,
}

Generated by sea-orm-macros

Variants

  • Destination: Generated by sea-orm-macros
  • Seq: Generated by sea-orm-macros
  • FeedState: Generated by sea-orm-macros
  • FeedCursor: Generated by sea-orm-macros
  • FeedError: Generated by sea-orm-macros
  • FeedCheckedAt: Generated by sea-orm-macros
  • ListingSeq: Generated by sea-orm-macros
  • ListingCursor: Generated by sea-orm-macros
  • ListingStartedAt: Generated by sea-orm-macros
  • ListedAt: Generated by sea-orm-macros
  • NextListingAt: Generated by sea-orm-macros
  • ListingError: Generated by sea-orm-macros
  • Objects: Generated by sea-orm-macros
  • CheckedSeq: Generated by sea-orm-macros
  • ListingBase: Generated by sea-orm-macros
  • Revision: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros

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

PrimaryKey

pub enum PrimaryKey {
    Destination,
}

Generated by sea-orm-macros

Variants

  • Destination: 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