async fn send_long_data<'a, I>(&mut self, statement_id: u32, params: I) -> Result<()>
    where
        I: Iterator<Item = &'a Value>,
    {
        for (i, value) in params.enumerate() {
            if let Value::Bytes(bytes) = value {
                let chunks = bytes.chunks(MAX_PAYLOAD_LEN - 6);
                let chunks = chunks.chain(if bytes.is_empty() {
                    Some(&[][..])
                } else {
                    None
                });
                for chunk in chunks {
                    let com = ComStmtSendLongData::new(statement_id, i, chunk);
                    self.write_command_raw(com.into()).await?;
                }
            }
        }

        Ok(())
    }
/// Helper, that sends all `Value::Bytes` in the given list of paramenters as long data.
Helper, that sends all `Value::Bytes` in the given list of paramenters as long data.
Helper that sends all ` Value :: Bytes ` in the given list of paramenters as long data .
async fn send_long_data<'a, I>(&mut self, statement_id: u32, params: I) -> Result<()>
    where
        I: Iterator<Item = &'a Value>,
    {
        for (i, value) in params.enumerate() {
            if let Value::Bytes(bytes) = value {
                let chunks = bytes.chunks(MAX_PAYLOAD_LEN - 6);
                let chunks = chunks.chain(if bytes.is_empty() {
                    Some(&[][..])
                } else {
                    None
                });
                for chunk in chunks {
                    let com = ComStmtSendLongData::new(statement_id, i, chunk);
                    self.write_command_raw(com.into()).await?;
                }
            }
        }
        Ok(())
    }
async fn send_long_data < ' a , I > ( & mut self , statement_id : u32 , params : I ) -> Result < ( ) > where I : Iterator < Item = & ' a Value > , { for ( i , value ) in params . enumerate ( ) { if let Value :: Bytes ( bytes ) = value { let chunks = bytes . chunks ( MAX_PAYLOAD_LEN - 6 ) ; let chunks = chunks . chain ( if bytes . is_empty ( ) { Some ( & [ ] [ .. ] ) } else { None } ) ; for chunk in chunks { let com = ComStmtSendLongData :: new ( statement_id , i , chunk ) ; self . write_command_raw ( com . into ( ) ) . await ? ; } } } Ok ( ( ) ) }
Helper, that sends all `Value::Bytes` in the given list of paramenters as long data.
Helper that sends all ` Value :: Bytes ` in the given list of paramenters as long data .
&mut self
statement_id
u32
params
I
&mut self
statement_id
u32
params
I