Skip to main content

bundle_version_insert_tx

Function bundle_version_insert_tx 

Source
pub(crate) fn bundle_version_insert_tx(
    tx: &Transaction<'_>,
    bundle_id: &str,
    name: &str,
    instructions: &str,
    source: &str,
    source_detail: &str,
    written_by: &str,
    written_by_uid: &str,
) -> Result<BundleVersion, StoreError>
Expand description

Appends a version row within an ALREADY-OPEN transaction — the shared implementation both Store::bundle_version_insert below (opens its own transaction) and Store::bundle_upsert_with_version (bundles.rs, reuses the SAME transaction as its own db_bundles write, so the bundle row and its version can never observably diverge under a concurrent writer — codex P2, PR #3237) call, rather than duplicating the parent-chain-lookup + INSERT SQL in two places. pub(crate), not private: bundles.rs is a sibling module in this same crate, not this one.