/// Shard `predicate` and dispatch it to the appropriate shard.
Shard `predicate` and dispatch it to the appropriate shard.
Shard ` predicate ` and dispatch it to the appropriate shard .
async fn delete(
        &self,
        namespace: &DatabaseName<'static>,
        table_name: &str,
        predicate: &DeletePredicate,
        span_ctx: Option<SpanContext>,
    ) -> Result<(), ShardError> {
        let predicate = predicate.clone();
        let sequencers = self.sharder.shard(table_name, namespace, &predicate);
        let dml = DmlDelete::new(
            namespace,
            predicate,
            NonEmptyString::new(table_name),
            DmlMeta::unsequenced(span_ctx),
        );
        let iter = sequencers.into_iter().map(|s| {
            trace!(sequencer_id=%s.id(), %table_name, %namespace, "routing delete to shard");
            (s, DmlOperation::from(dml.clone()))
        });
        // TODO: return sequencer metadata
        parallel_enqueue(iter).await?;
        Ok(())
    }
async fn delete ( & self , namespace : & DatabaseName < ' static > , table_name : & str , predicate : & DeletePredicate , span_ctx : Option < SpanContext > , ) -> Result < ( ) , ShardError > { let predicate = predicate . clone ( ) ; let sequencers = self . sharder . shard ( table_name , namespace , & predicate ) ; let dml = DmlDelete :: new ( namespace , predicate , NonEmptyString :: new ( table_name ) , DmlMeta :: unsequenced ( span_ctx ) , ) ; let iter = sequencers . into_iter ( ) . map ( | s | { trace ! ( sequencer_id s id ( ) table_name namespace " " ) ; ( s , DmlOperation :: from ( dml . clone ( ) ) ) } ) ; // TODO: return sequencer metadata parallel_enqueue ( iter ) . await ? ; Ok ( ( ) ) }
Shard `predicate` and dispatch it to the appropriate shard.
Shard ` predicate ` and dispatch it to the appropriate shard .
&self
namespace
&DatabaseName<'static>
table_name
&str
predicate
&DeletePredicate
span_ctx
Option<SpanContext>