bookclerk_library::entities::ingest_members

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

Last updated View as Markdown

SeaORM entity for ingest_members: one file of an ingest batch and what became of it. Written by control_plane::ingest.

Item Kind Summary
Model struct Row shape for one member.
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 batch_id: String,
    pub member_no: i64,
    pub parent_no: Option<i64>,
    pub path: String,
    pub size: i64,
    pub sha256: Option<String>,
    pub received: i64,
    pub storage_key: Option<String>,
    pub signature: Option<String>,
    pub outcome: String,
    pub reason: Option<String>,
    pub edition_id: Option<String>,
    pub updated_at: String,
}

Row shape for one member.

Fields

  • batch_id: The batch (ingest_batches.id).
  • member_no: Position in the batch, from 0: manifest files first, then the entries archives expanded into.
  • parent_no: The archive member this file was expanded from; None for a file the manifest named.
  • path: Relative path in the batch (canonical bookclerk_archive::EntryPath form), or the sanitized name of a refused archive entry.
  • size: Size in bytes: declared by the manifest, or written by the archive walk.
  • sha256: Lower-case hex SHA-256 the manifest declared, when it declared one.
  • received: Bytes staged so far (equal to size once complete).
  • storage_key: For an intake member, its key in the batch's intake instance.
  • signature: For an intake member, the storage signature it was listed with.
  • outcome: pending, expanded, matched, needs_review, duplicate, refused or failed.
  • reason: Why it was refused or failed (a stable snake_case reason).
  • edition_id: The edition a stored member belongs to.
  • updated_at: RFC 3339 time of the last change.

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 batch_id: ActiveValue<String>,
    pub member_no: ActiveValue<i64>,
    pub parent_no: ActiveValue<Option<i64>>,
    pub path: ActiveValue<String>,
    pub size: ActiveValue<i64>,
    pub sha256: ActiveValue<Option<String>>,
    pub received: ActiveValue<i64>,
    pub storage_key: ActiveValue<Option<String>>,
    pub signature: ActiveValue<Option<String>>,
    pub outcome: ActiveValue<String>,
    pub reason: ActiveValue<Option<String>>,
    pub edition_id: ActiveValue<Option<String>>,
    pub updated_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • batch_id: Generated by sea-orm-macros
  • member_no: Generated by sea-orm-macros
  • parent_no: Generated by sea-orm-macros
  • path: Generated by sea-orm-macros
  • size: Generated by sea-orm-macros
  • sha256: Generated by sea-orm-macros
  • received: Generated by sea-orm-macros
  • storage_key: Generated by sea-orm-macros
  • signature: Generated by sea-orm-macros
  • outcome: Generated by sea-orm-macros
  • reason: Generated by sea-orm-macros
  • edition_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 {
    BatchId,
    MemberNo,
    ParentNo,
    Path,
    Size,
    Sha256,
    Received,
    StorageKey,
    Signature,
    Outcome,
    Reason,
    EditionId,
    UpdatedAt,
}

Generated by sea-orm-macros

Variants

  • BatchId: Generated by sea-orm-macros
  • MemberNo: Generated by sea-orm-macros
  • ParentNo: Generated by sea-orm-macros
  • Path: Generated by sea-orm-macros
  • Size: Generated by sea-orm-macros
  • Sha256: Generated by sea-orm-macros
  • Received: Generated by sea-orm-macros
  • StorageKey: Generated by sea-orm-macros
  • Signature: Generated by sea-orm-macros
  • Outcome: Generated by sea-orm-macros
  • Reason: Generated by sea-orm-macros
  • EditionId: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros

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

PrimaryKey

pub enum PrimaryKey {
    BatchId,
    MemberNo,
}

Generated by sea-orm-macros

Variants

  • BatchId: Generated by sea-orm-macros
  • MemberNo: 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