/// Convenience to transact EntityOperation instead of EntityModification
Convenience to transact EntityOperation instead of EntityModification
Convenience to transact EntityOperation instead of EntityModification
pub fn transact_entity_operations(
    store: &Arc<Store>,
    subgraph_id: SubgraphDeploymentId,
    block_ptr_to: EthereumBlockPointer,
    ops: Vec<EntityOperation>,
) -> Result<bool, StoreError> {
    let mut entity_cache = EntityCache::new();
    entity_cache.append(ops);
    let mods = entity_cache
        .as_modifications(store.as_ref())
        .expect("failed to convert to modifications")
        .modifications;
    let metrics_registry = Arc::new(MockMetricsRegistry::new());
    let stopwatch_metrics = StopwatchMetrics::new(
        Logger::root(slog::Discard, o!()),
        subgraph_id.clone(),
        metrics_registry.clone(),
    );
    store.transact_block_operations(subgraph_id, block_ptr_to, mods, stopwatch_metrics)
}
pub fn transact_entity_operations ( store : & Arc < Store > , subgraph_id : SubgraphDeploymentId , block_ptr_to : EthereumBlockPointer , ops : Vec < EntityOperation > , ) -> Result < bool , StoreError > { let mut entity_cache = EntityCache :: new ( ) ; entity_cache . append ( ops ) ; let mods = entity_cache . as_modifications ( store . as_ref ( ) ) . expect ( " " ) . modifications ; let metrics_registry = Arc :: new ( MockMetricsRegistry :: new ( ) ) ; let stopwatch_metrics = StopwatchMetrics :: new ( Logger :: root ( slog :: Discard , o ! ( ) ) , subgraph_id . clone ( ) , metrics_registry . clone ( ) , ) ; store . transact_block_operations ( subgraph_id , block_ptr_to , mods , stopwatch_metrics ) }
Convenience to transact EntityOperation instead of EntityModification
Convenience to transact EntityOperation instead of EntityModification
store
&Arc<Store>
subgraph_id
SubgraphDeploymentId
block_ptr_to
EthereumBlockPointer
ops
Vec<EntityOperation>