MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / insert_allocations

Function insert_allocations

indexer/src/database.rs:221–231  ·  view source on GitHub ↗
(
    db: &Database,
    allocations: impl Iterator<Item = allocation::ActiveModel>,
)

Source from the content-addressed store, hash-verified

219}
220
221pub async fn insert_allocations(
222 db: &Database,
223 allocations: impl Iterator<Item = allocation::ActiveModel>,
224) -> Result<(), DbErr> {
225 let res = Allocation::insert_many(allocations)
226 .on_empty_do_nothing()
227 .exec(db.db())
228 .await?;
229 log::debug!("Allocation::insert_many: {:?}", res);
230 Ok(())
231}

Callers 1

batchMethod · 0.85

Calls 1

dbMethod · 0.80

Tested by

no test coverage detected