pub fn load_commits_after_block(
        &self,
        block: BlockNumber,
        limit: i64,
    ) -> QueryResult<Vec<(Operation, bool)>> {
        self.0.conn().transaction(|| {
            let ops: Vec<(StoredOperation, Option<StoredProof>)> = diesel::sql_query(format!(
                "SELECT operations.*, proofs.*
                   FROM operations
                        LEFT JOIN blocks
                               ON number = block_number
                        LEFT JOIN proofs
                            USING (block_number)
                  WHERE operations.action_type = 'COMMIT'
                    AND operations.block_number > {}
                  ORDER BY operations.block_number
                  LIMIT {}
                ",
                block, limit
            ))
            .load(self.0.conn())?;
            ops.into_iter()
                .map(|(o, p)| {
                    let op = o.into_op(self.0)?;
                    Ok((op, p.is_some()))
                })
                .collect()
        })
    }
/// Returns tuple (commit operation, true if there is proof for the operation).
Returns tuple (commit operation, true if there is proof for the operation).
Returns tuple ( commit operation true if there is proof for the operation ) .
pub fn load_commits_after_block(
        &self,
        block: BlockNumber,
        limit: i64,
    ) -> QueryResult<Vec<(Operation, bool)>> {
        self.0.conn().transaction(|| {
            let ops: Vec<(StoredOperation, Option<StoredProof>)> = diesel::sql_query(format!(
                "SELECT operations.*, proofs.*
                   FROM operations
                        LEFT JOIN blocks
                               ON number = block_number
                        LEFT JOIN proofs
                            USING (block_number)
                  WHERE operations.action_type = 'COMMIT'
                    AND operations.block_number > {}
                  ORDER BY operations.block_number
                  LIMIT {}
                ",
                block, limit
            ))
            .load(self.0.conn())?;
            ops.into_iter()
                .map(|(o, p)| {
                    let op = o.into_op(self.0)?;
                    Ok((op, p.is_some()))
                })
                .collect()
        })
    }
pub fn load_commits_after_block ( & self , block : BlockNumber , limit : i64 , ) -> QueryResult < Vec < ( Operation , bool ) > > { self . 0 . conn ( ) . transaction ( | | { let ops : Vec < ( StoredOperation , Option < StoredProof > ) > = diesel :: sql_query ( format ! ( " " block limit ) ) . load ( self . 0 . conn ( ) ) ? ; ops . into_iter ( ) . map ( | ( o , p ) | { let op = o . into_op ( self . 0 ) ? ; Ok ( ( op , p . is_some ( ) ) ) } ) . collect ( ) } ) }
Returns tuple (commit operation, true if there is proof for the operation).
Returns tuple ( commit operation true if there is proof for the operation ) .
&self
block
BlockNumber
limit
i64