/** * @param $table * @param $column * @param null $where * @return int */ public function avg($table, $column, $where = NULL) { if (empty($this->_reader)) { return $this->_writer->avg($table, $column, $where); } else { return $this->_reader->avg($table, $column, $where); } }