Skip to content

Commit

Permalink
store: Do not return a StoreEvent from Layout.truncate_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lutter committed Mar 4, 2025
1 parent 9886aa1 commit 5a1bb5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions store/postgres/src/relational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ use graph::data::store::{Id, IdList, IdType, BYTES_SCALAR};
use graph::data::subgraph::schema::POI_TABLE;
use graph::prelude::{
anyhow, info, BlockNumber, DeploymentHash, Entity, EntityOperation, Logger,
QueryExecutionError, StoreError, StoreEvent, ValueType,
QueryExecutionError, StoreError, ValueType,
};

use crate::block_range::{BoundSide, BLOCK_COLUMN, BLOCK_RANGE_COLUMN};
Expand Down Expand Up @@ -1004,11 +1004,11 @@ impl Layout {
Ok(count)
}

pub fn truncate_tables(&self, conn: &mut PgConnection) -> Result<StoreEvent, StoreError> {
pub fn truncate_tables(&self, conn: &mut PgConnection) -> Result<(), StoreError> {
for table in self.tables.values() {
sql_query(&format!("TRUNCATE TABLE {}", table.qualified_name)).execute(conn)?;
}
Ok(StoreEvent::new(vec![]))
Ok(())
}

/// Revert the block with number `block` and all blocks with higher
Expand Down

0 comments on commit 5a1bb5e

Please sign in to comment.