public function doQuery($sql, $isExecute = false, $method = 'fetch', $fetchMode = null, $forRead = null){
        if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) {
            $pdo = $this->db->getSlavePdo();
        } else {
            $pdo = $this->db->getMasterPdo();
        }
        return $pdo->doQuery($sql, $isExecute, $method, $fetchMode);
    }
public function doQuery($sql, $isExecute = false, $method = 'fetch', $fetchMode = null, $forRead = null){
        if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) {
            $pdo = $this->db->getSlavePdo();
        } else {
            $pdo = $this->db->getMasterPdo();
        }
        return $pdo->doQuery($sql, $isExecute, $method, $fetchMode);
    }
public function doQuery ( $ sql , $ isExecute = false , $ method = 'fetch' , $ fetchMode = null , $ forRead = null ) { if ( $ forRead || $ forRead === null && $ this -> db -> getSchema ( ) -> isReadQuery ( $ sql ) ) { $ pdo = $ this -> db -> getSlavePdo ( ) ; } else { $ pdo = $ this -> db -> getMasterPdo ( ) ; } return $ pdo -> doQuery ( $ sql , $ isExecute , $ method , $ fetchMode ) ; }
Execute sql by mysql pool
@TODO support slave
@TODO support transaction
@param $sql
@param bool $isExecute
@param string $method
@param null $fetchMode
@param null $forRead
@return mixed
Execute sql by mysql pool