bookclerk_library::entities::library_work_rows
SeaORM entity for library_work_rows: the library's page index.
One row per held top-level work, refreshed from the library model by
crate::LibraryStore::refresh_library_works, so list views page one
table instead of joining works, editions, listings and holdings.
| 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 work_id: String,
pub kind: String,
pub title: String,
pub sort_title: String,
pub authors: Option<String>,
pub sort_author: String,
pub series: Option<String>,
pub series_position: Option<String>,
pub cover_edition_id: Option<String>,
pub media_kinds: String,
pub acquire_status: String,
pub edition_count: i64,
pub holding_count: i64,
pub added_at: String,
pub sort_series: String,
pub length_minutes: i64,
pub purchased_at: String,
pub refreshed_at: String,
pub facets_ready: i64,
}
Row shape for this table (DeriveEntityModel).
Fields
work_id: The work (works.id); a top-level work, never a podcast episode.kind: Work kind (WorkKind::as_str):bookorpodcast.title: The work's display title.sort_title: Sort key of the title: lower case, a leading article dropped.authors: Authors (or a show's hosts) joined for display, in billing order.sort_author: Sort key of the first author; empty when the work names none.series: Name of the first series the work belongs to.series_position: The work's position inSelf::series, as the store wrote it.cover_edition_id: The edition whose cover the list shows (editions.id).media_kinds: Sorted, comma-joined media kinds of the work's editions (MediaKind::as_str), such asaudio,ebook.acquire_status: The furthest acquire state any edition of the work reached (AcquireStatus::as_str).edition_count: How many editions the work has.holding_count: How many holdings (account or node) the work's listings have.added_at: RFC 3339 timestamp of the work's newest holding, for "recently added".sort_series: Sort key of the series order:0, the lower-cased first series name, a separator and the zero-padded position;1when the work is in no series, so those sort last.length_minutes: Runtime in minutes of the work's longest held edition; 0 when no store reported one.purchased_at: RFC 3339 timestamp of the newest purchase a store reported for the work's holdings; empty when none did.refreshed_at: RFC 3339 timestamp at which the refresh that wrote this row read the model; a refresh that read earlier never overwrites it.facets_ready: 1 once everylibrary_work_facetsrow of the refresh that wrote this row is in place, 0 while they are being replaced. A patron scope admits only rows at 1.
pub fn into_ex(self) -> Self
Generated by sea-orm-macros
Implements: Clone, Debug, 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 work_id: ActiveValue<String>,
pub kind: ActiveValue<String>,
pub title: ActiveValue<String>,
pub sort_title: ActiveValue<String>,
pub authors: ActiveValue<Option<String>>,
pub sort_author: ActiveValue<String>,
pub series: ActiveValue<Option<String>>,
pub series_position: ActiveValue<Option<String>>,
pub cover_edition_id: ActiveValue<Option<String>>,
pub media_kinds: ActiveValue<String>,
pub acquire_status: ActiveValue<String>,
pub edition_count: ActiveValue<i64>,
pub holding_count: ActiveValue<i64>,
pub added_at: ActiveValue<String>,
pub sort_series: ActiveValue<String>,
pub length_minutes: ActiveValue<i64>,
pub purchased_at: ActiveValue<String>,
pub refreshed_at: ActiveValue<String>,
pub facets_ready: ActiveValue<i64>,
}
Generated by sea-orm-macros
Fields
work_id: Generated by sea-orm-macroskind: Generated by sea-orm-macrostitle: Generated by sea-orm-macrossort_title: Generated by sea-orm-macrosauthors: Generated by sea-orm-macrossort_author: Generated by sea-orm-macrosseries: Generated by sea-orm-macrosseries_position: Generated by sea-orm-macroscover_edition_id: Generated by sea-orm-macrosmedia_kinds: Generated by sea-orm-macrosacquire_status: Generated by sea-orm-macrosedition_count: Generated by sea-orm-macrosholding_count: Generated by sea-orm-macrosadded_at: Generated by sea-orm-macrossort_series: Generated by sea-orm-macroslength_minutes: Generated by sea-orm-macrospurchased_at: Generated by sea-orm-macrosrefreshed_at: Generated by sea-orm-macrosfacets_ready: 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 {
WorkId,
Kind,
Title,
SortTitle,
Authors,
SortAuthor,
Series,
SeriesPosition,
CoverEditionId,
MediaKinds,
AcquireStatus,
EditionCount,
HoldingCount,
AddedAt,
SortSeries,
LengthMinutes,
PurchasedAt,
RefreshedAt,
FacetsReady,
}
Generated by sea-orm-macros
Variants
WorkId: Generated by sea-orm-macrosKind: Generated by sea-orm-macrosTitle: Generated by sea-orm-macrosSortTitle: Generated by sea-orm-macrosAuthors: Generated by sea-orm-macrosSortAuthor: Generated by sea-orm-macrosSeries: Generated by sea-orm-macrosSeriesPosition: Generated by sea-orm-macrosCoverEditionId: Generated by sea-orm-macrosMediaKinds: Generated by sea-orm-macrosAcquireStatus: Generated by sea-orm-macrosEditionCount: Generated by sea-orm-macrosHoldingCount: Generated by sea-orm-macrosAddedAt: Generated by sea-orm-macrosSortSeries: Generated by sea-orm-macrosLengthMinutes: Generated by sea-orm-macrosPurchasedAt: Generated by sea-orm-macrosRefreshedAt: Generated by sea-orm-macrosFacetsReady: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
WorkId,
}
Generated by sea-orm-macros
Variants
WorkId: 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