Skip to main content

upsert_from_snapshot

Function upsert_from_snapshot 

Source
pub async fn upsert_from_snapshot(
    conn: &mut PgConnection,
    snapshot: &ChapterSnapshot,
) -> ModelResult<()>
Expand description

Writes every field of the snapshot to the chapter, creating it with the snapshot’s id if it does not exist and bringing it back if it is deleted. Does not touch the chapter’s pages.