pub fn collect_one<T: IsDao + IsTable>(&mut self, db: &Database) -> Result<T, DbError> {
        let result = try!(self.retrieve(db));
        match result.cast_one() {
            Some(res) => Ok(res),
            None => Err(DbError::new("No entry to collect found.")),
        }
    }
/// execute the query then collect only 1 record
execute the query then collect only 1 record
execute the query then collect only 1 record
pub fn collect_one<T: IsDao + IsTable>(&mut self, db: &Database) -> Result<T, DbError> {
        let result = try!(self.retrieve(db));
        match result.cast_one() {
            Some(res) => Ok(res),
            None => Err(DbError::new("No entry to collect found.")),
        }
    }
pub fn collect_one < T : IsDao + IsTable > ( & mut self , db : & Database ) -> Result < T , DbError > { let result = try ! ( self retrieve ( db ) ) ; match result . cast_one ( ) { Some ( res ) => Ok ( res ) , None => Err ( DbError :: new ( " " ) ) , } }
execute the query then collect only 1 record
execute the query then collect only 1 record
&mut self
db
&Database
&mut self
db
&Database