Skip to content

Commit c3f803a

Browse files
committed
Merge branch 'feat/database-impl' into feat/indexer-impl
2 parents 25ebfee + d15e438 commit c3f803a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

crates/database/db/src/operations.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ use sea_orm::{ActiveModelTrait, ColumnTrait, DbErr, EntityTrait, QueryFilter, Se
88
/// The [`DatabaseOperations`] trait provides methods for interacting with the database.
99
#[async_trait::async_trait]
1010
pub trait DatabaseOperations: DatabaseConnectionProvider {
11-
/// Insert a [`BatchInput`] into the database and returns the batch input model
12-
/// ([`models::batch_input::Model`]).
13-
async fn insert_batch_input(
14-
&self,
15-
batch_input: BatchInput,
16-
) -> Result<models::batch_input::Model, DatabaseError> {
11+
/// Insert a [`BatchInput`] into the database.
12+
async fn insert_batch_input(&self, batch_input: BatchInput) -> Result<(), DatabaseError> {
1713
tracing::trace!(target: "scroll::db", batch_hash = ?batch_input.batch_hash(), batch_index = batch_input.batch_index(), "Inserting batch input into database.");
1814
let batch_input: models::batch_input::ActiveModel = batch_input.into();
19-
Ok(batch_input.insert(self.get_connection()).await?)
15+
batch_input.insert(self.get_connection()).await?;
16+
Ok(())
2017
}
2118

2219
/// Finalize a [`BatchInput`] with the provided `batch_hash` in the database and set the

0 commit comments

Comments
 (0)