pub fn find_missing_guids<'a>(
        &self,
        feed_id: i64,
        guids: &[&'a str],
    ) -> Result<Vec<&'a str>, Error> {
        // TODO: Use virtual tables or figure out how to use carray.
        let mut stmt = self
            .connection
            .prepare("SELECT guid FROM entries WHERE feed_id = ?1 AND guid = ?2")?;

        let mut missing_guids: Vec<&str> = Vec::with_capacity(guids.len());

        for guid in guids.iter() {
            match stmt.exists(&[&feed_id as &ToSql, guid]) {
                Ok(false) => {
                    missing_guids.push(guid);
                }
                Ok(true) => {}
                Err(e) => return Err(e.into()),
            }
        }

        Ok(missing_guids)
    }
/// Returns a list of GUIDs not already present under the given feed_id.
Returns a list of GUIDs not already present under the given feed_id.
Returns a list of GUIDs not already present under the given feed_id .
pub fn find_missing_guids<'a>(
        &self,
        feed_id: i64,
        guids: &[&'a str],
    ) -> Result<Vec<&'a str>, Error> {
        // TODO: Use virtual tables or figure out how to use carray.
        let mut stmt = self
            .connection
            .prepare("SELECT guid FROM entries WHERE feed_id = ?1 AND guid = ?2")?;
        let mut missing_guids: Vec<&str> = Vec::with_capacity(guids.len());
        for guid in guids.iter() {
            match stmt.exists(&[&feed_id as &ToSql, guid]) {
                Ok(false) => {
                    missing_guids.push(guid);
                }
                Ok(true) => {}
                Err(e) => return Err(e.into()),
            }
        }
        Ok(missing_guids)
    }
pub fn find_missing_guids < ' a > ( & self , feed_id : i64 , guids : & [ & ' a str ] , ) -> Result < Vec < & ' a str > , Error > { // TODO: Use virtual tables or figure out how to use carray. let mut stmt = self . connection . prepare ( " " ) ? ; let mut missing_guids : Vec < & str > = Vec :: with_capacity ( guids . len ( ) ) ; for guid in guids . iter ( ) { match stmt . exists ( & [ & feed_id as & ToSql , guid ] ) { Ok ( false ) => { missing_guids . push ( guid ) ; } Ok ( true ) => { } Err ( e ) => return Err ( e . into ( ) ) , } } Ok ( missing_guids ) }
Returns a list of GUIDs not already present under the given feed_id.
Returns a list of GUIDs not already present under the given feed_id .
&self
feed_id
i64
guids
&[&'a str]