bookclerk_library::entities::metadata_claims

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

Last updated View as Markdown

SeaORM entity for metadata_claims: one source's value for one field of one subject (docs/adr/metadata-claims-and-file-sync.md). Chapters of an edition are the only field so far (store::chapters).

Item Kind Summary
Model struct Row shape for one claim.
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).

Structs

Model

pub struct Model {
    pub subject_kind: String,
    pub subject_id: String,
    pub field: String,
    pub source_kind: String,
    pub source_id: String,
    pub locale: String,
    pub quality: String,
    pub value_digest: String,
    pub runtime_ms: Option<i64>,
    pub input_digest: Option<String>,
    pub revision: i64,
    pub pinned_at: Option<String>,
    pub pinned_by_user_id: Option<i64>,
    pub created_by_user_id: Option<i64>,
    pub updated_at: String,
}

Row shape for one claim.

Fields

  • subject_kind: What the claim is about: edition.
  • subject_id: The subject's id (editions.id).
  • field: The field: chapters.
  • source_kind: The kind of source (crate::ChapterSourceKind spelling).
  • source_id: Which source of that kind: a plugin key for a provider or a store, empty for a person's edit and for Bookclerk's own processing.
  • locale: BCP 47 language of the value; empty when unknown or not applicable.
  • quality: Where a machine source ranks (crate::ClaimQuality spelling); empty for people and for Bookclerk's own processing.
  • value_digest: Digest of the value (a chapter_lists row for chapters).
  • runtime_ms: Length of the timeline the value was measured on, in milliseconds.
  • input_digest: For a processed claim, the digest of the value it was derived from.
  • revision: The subject's claim counter when this claim last changed.
  • pinned_at: RFC 3339 time an Administrator pinned the claim; None when not pinned.
  • pinned_by_user_id: The Administrator who pinned it.
  • created_by_user_id: The person whose edit the claim is, for a person's edit.
  • updated_at: RFC 3339 time the claim 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 subject_kind: ActiveValue<String>,
    pub subject_id: ActiveValue<String>,
    pub field: ActiveValue<String>,
    pub source_kind: ActiveValue<String>,
    pub source_id: ActiveValue<String>,
    pub locale: ActiveValue<String>,
    pub quality: ActiveValue<String>,
    pub value_digest: ActiveValue<String>,
    pub runtime_ms: ActiveValue<Option<i64>>,
    pub input_digest: ActiveValue<Option<String>>,
    pub revision: ActiveValue<i64>,
    pub pinned_at: ActiveValue<Option<String>>,
    pub pinned_by_user_id: ActiveValue<Option<i64>>,
    pub created_by_user_id: ActiveValue<Option<i64>>,
    pub updated_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • subject_kind: Generated by sea-orm-macros
  • subject_id: Generated by sea-orm-macros
  • field: Generated by sea-orm-macros
  • source_kind: Generated by sea-orm-macros
  • source_id: Generated by sea-orm-macros
  • locale: Generated by sea-orm-macros
  • quality: Generated by sea-orm-macros
  • value_digest: Generated by sea-orm-macros
  • runtime_ms: Generated by sea-orm-macros
  • input_digest: Generated by sea-orm-macros
  • revision: Generated by sea-orm-macros
  • pinned_at: Generated by sea-orm-macros
  • pinned_by_user_id: Generated by sea-orm-macros
  • created_by_user_id: 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 {
    SubjectKind,
    SubjectId,
    Field,
    SourceKind,
    SourceId,
    Locale,
    Quality,
    ValueDigest,
    RuntimeMs,
    InputDigest,
    Revision,
    PinnedAt,
    PinnedByUserId,
    CreatedByUserId,
    UpdatedAt,
}

Generated by sea-orm-macros

Variants

  • SubjectKind: Generated by sea-orm-macros
  • SubjectId: Generated by sea-orm-macros
  • Field: Generated by sea-orm-macros
  • SourceKind: Generated by sea-orm-macros
  • SourceId: Generated by sea-orm-macros
  • Locale: Generated by sea-orm-macros
  • Quality: Generated by sea-orm-macros
  • ValueDigest: Generated by sea-orm-macros
  • RuntimeMs: Generated by sea-orm-macros
  • InputDigest: Generated by sea-orm-macros
  • Revision: Generated by sea-orm-macros
  • PinnedAt: Generated by sea-orm-macros
  • PinnedByUserId: Generated by sea-orm-macros
  • CreatedByUserId: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros

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

PrimaryKey

pub enum PrimaryKey {
    SubjectKind,
    SubjectId,
    Field,
    SourceKind,
    SourceId,
    Locale,
}

Generated by sea-orm-macros

Variants

  • SubjectKind: Generated by sea-orm-macros
  • SubjectId: Generated by sea-orm-macros
  • Field: Generated by sea-orm-macros
  • SourceKind: Generated by sea-orm-macros
  • SourceId: Generated by sea-orm-macros
  • Locale: Generated by sea-orm-macros

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

Relation

pub enum Relation {}

Declared SeaORM relations (none).

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

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