bookclerk_library::entities::edition_copies
SeaORM entity for edition_copies: each edition's copy at each output
destination and where it stands (storage destinations ADR,
docs/adr/storage-destinations.md, decision 3).
Written by the acquire pipeline once each destination's write ends
(crate::LibraryStore::set_copy_stored,
crate::LibraryStore::set_copy_pending) and by a host upload's commit
on the owner; read by acquire candidate selection, which visits an
acquired edition again while a destination that takes it lacks a stored
copy.
| 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). |
pub struct Model {
pub edition_id: String,
pub destination: String,
pub state: String,
pub storage_key: Option<String>,
pub attempts: i64,
pub next_attempt_at: Option<String>,
pub last_error: Option<String>,
pub updated_at: String,
}
Row shape for this table (DeriveEntityModel).
Fields
edition_id: The edition (editions.id).destination: The destination's plugin instance id.state: Where the copy stands (CopyState::as_str):stored,pending,missingorfailed.storage_key: The edition's primary audio key on this destination; set once stored, and kept from an earlier stored copy while a later write is retried.attempts: Failed writes since the copy was last stored (0 once stored).next_attempt_at: RFC 3339 time the next background attempt is due;Noneunless pending.last_error: The last write failure, for operators;Noneonce stored.updated_at: RFC 3339 timestamp when the row was last modified.
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>
pub struct ColumnIter {
/* private fields */
}
An iterator over the variants of Column
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct Entity;
Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic
pub struct PrimaryKeyIter {
/* private fields */
}
An iterator over the variants of PrimaryKey
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct ActiveModel {
pub edition_id: ActiveValue<String>,
pub destination: ActiveValue<String>,
pub state: ActiveValue<String>,
pub storage_key: ActiveValue<Option<String>>,
pub attempts: ActiveValue<i64>,
pub next_attempt_at: ActiveValue<Option<String>>,
pub last_error: ActiveValue<Option<String>>,
pub updated_at: ActiveValue<String>,
}
Generated by sea-orm-macros
Fields
edition_id: Generated by sea-orm-macrosdestination: Generated by sea-orm-macrosstate: Generated by sea-orm-macrosstorage_key: Generated by sea-orm-macrosattempts: Generated by sea-orm-macrosnext_attempt_at: Generated by sea-orm-macroslast_error: Generated by sea-orm-macrosupdated_at: Generated by sea-orm-macros
Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct RelationIter {
/* private fields */
}
An iterator over the variants of Relation
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub enum Column {
EditionId,
Destination,
State,
StorageKey,
Attempts,
NextAttemptAt,
LastError,
UpdatedAt,
}
Generated by sea-orm-macros
Variants
EditionId: Generated by sea-orm-macrosDestination: Generated by sea-orm-macrosState: Generated by sea-orm-macrosStorageKey: Generated by sea-orm-macrosAttempts: Generated by sea-orm-macrosNextAttemptAt: Generated by sea-orm-macrosLastError: Generated by sea-orm-macrosUpdatedAt: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
EditionId,
Destination,
}
Generated by sea-orm-macros
Variants
EditionId: Generated by sea-orm-macrosDestination: Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait
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