From 5a1bb5e2c6d04a816e890243781e345a6971e50a Mon Sep 17 00:00:00 2001 From: David Lutterkort Date: Tue, 4 Mar 2025 18:38:47 +0100 Subject: [PATCH] store: Do not return a StoreEvent from Layout.truncate_tables --- store/postgres/src/relational.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/postgres/src/relational.rs b/store/postgres/src/relational.rs index 8a8f47b6560..c1e7bceef60 100644 --- a/store/postgres/src/relational.rs +++ b/store/postgres/src/relational.rs @@ -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}; @@ -1004,11 +1004,11 @@ impl Layout { Ok(count) } - pub fn truncate_tables(&self, conn: &mut PgConnection) -> Result { + 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