fn execute_with_return(&self, query: &Select) -> Result<DaoResult, DbError> {
        let sql_frag = &self.build_select(query, &BuildMode::Standard);
        let result = try!(self.execute_sql_with_return(&sql_frag.sql, &sql_frag.params));
        if query.enable_query_stat{
            let (page, page_size, total) = try!(self.get_query_stats(query));
            let dao_result = DaoResult {
                dao: result,
                renamed_columns: query.get_renamed_columns(),
                total: total,
                page: page,
                page_size: page_size,
            };
            Ok(dao_result)
        }else{
            let dao_result = DaoResult {
                dao: result,
                renamed_columns: query.get_renamed_columns(),
                total: None,
                page: None,
                page_size: None,
            };
            Ok(dao_result)
        }
    }
/// execute query with return dao,
/// use the enumerated column for data extraction when db doesn't support returning the records column names
execute query with return dao,
use the enumerated column for data extraction when db doesn't support returning the records column names
execute query with return dao use the enumerated column for data extraction when db doesn ' t support returning the records column names
fn execute_with_return(&self, query: &Select) -> Result<DaoResult, DbError> {
        let sql_frag = &self.build_select(query, &BuildMode::Standard);
        let result = try!(self.execute_sql_with_return(&sql_frag.sql, &sql_frag.params));
        if query.enable_query_stat{
            let (page, page_size, total) = try!(self.get_query_stats(query));
            let dao_result = DaoResult {
                dao: result,
                renamed_columns: query.get_renamed_columns(),
                total: total,
                page: page,
                page_size: page_size,
            };
            Ok(dao_result)
        }else{
            let dao_result = DaoResult {
                dao: result,
                renamed_columns: query.get_renamed_columns(),
                total: None,
                page: None,
                page_size: None,
            };
            Ok(dao_result)
        }
    }
fn execute_with_return ( & self , query : & Select ) -> Result < DaoResult , DbError > { let sql_frag = & self . build_select ( query , & BuildMode :: Standard ) ; let result = try ! ( self execute_sql_with_return ( sql_frag sql sql_frag params ) ) ; if query . enable_query_stat { let ( page , page_size , total ) = try ! ( self get_query_stats ( query ) ) ; let dao_result = DaoResult { dao : result , renamed_columns : query . get_renamed_columns ( ) , total : total , page : page , page_size : page_size , } ; Ok ( dao_result ) } else { let dao_result = DaoResult { dao : result , renamed_columns : query . get_renamed_columns ( ) , total : None , page : None , page_size : None , } ; Ok ( dao_result ) } }
execute query with return dao,
use the enumerated column for data extraction when db doesn't support returning the records column names
execute query with return dao use the enumerated column for data extraction when db doesn ' t support returning the records column names
&self
query
&Select
&self
query
&Select