Retorna si la consulta se realizao con exito, si no ocurrio ningun error.
@param \PDOStatement $query
@return boolean
497055
protected function isOk(\PDOStatement $query){
        $error= $query->errorInfo();
        if($error[0] == '00000'){
            return TRUE;
        }else{
            $this->catchError($error);
            return FALSE;
        }
    }
1251484
public function statement($query, $bindings = array())
    {
        return $this->run($query, $bindings, function ($me, $query, $bindings)
        {
            if ($me->pretending()) return true;

            $bindings = $me->prepareBindings($bindings);

            //
            $statement = $me->createPdoStatement($query);

            return $statement->execute($bindings);
        });
    }
215356
public function statement($query, $bindings = [])
    {
        return $this->run($query, $bindings, function ($query, $bindings) {
            if ($this->pretending()) {
                return true;
            }

            $statement = $this->getPdo()->prepare($query);

            $this->bindValues($statement, $this->prepareBindings($bindings));

            return $statement->execute();
        });
    }
195563
public function statements(string $query)
    {
        try {
            $this->pdo->exec($query);
        } catch (\Throwable $exception) {
            throw static::wrapException($exception, $query);
        }
    }
148451
public function execute(\PDOStatement $pdoStatement): \PDOStatement
    {
        $result = $pdoStatement->execute();
        if ($result === false) {
            $this->throwError($pdoStatement->errorInfo());
        }

        return $pdoStatement;
    }
159805
public function searchDelete($query) {
		$request = new CPS_SearchDeleteRequest($query);
		$this->_lastResponse = $this->_connection->sendRequest($request);
		return $this->_lastResponse->getHits();
	}
1159737
protected function isAvailable($query)
    {
        $query->where(function ($query) {
            $query->whereNull('reserved_at')
                  ->where('available_at', '<=', $this->currentTime());
        });
    }
601876
protected function queryDriver($query)
    {
        $this->logger->debug($query);
        $result = $this->mysqli()->query($query);
        if (false === $result) {
            $this->logger->info("-- Query fail with SQL: $query");
            $this->logger->error("FAIL: $query\nLast message:" . $this->getLastMessage());
        }
        return $result;
    }
189518
public function results(string $query, array $params = [])
    {
        // Prepares the query, then stores it
        $PDOStatement = $this->pdo->prepare($query);

        // Executes the prepared query
        $PDOStatement->execute($params);

        // Fetchs all results, then returns them
        return $PDOStatement->fetchAll();
    }
36890
protected function checkQuery($query=null)
    {
        if ($query) {
            $this->getQuery()->set($query);
            unset($query);
        }
        
        $query = $this->getQuery();
        
        // if no table then set table
        if (!isset($query['table'])) {
            $query['table'] = $this->getTableName();
        }
        
        // use model database.table_prefix
        if (!isset($query['database']) && isset($this['database'])) {
            $query['database'] = $this['database'];
        }
        
        if (!isset($query['table_prefix']) && isset($this['table_prefix'])) {
            $query['table_prefix'] = $this['table_prefix'];
        }
        
        return static::formatQuery($query);
    }
452638
public function prepare($query)
    {
        $this->connect();
        $isObject = ($query instanceof Query);
        $queryStringRaw = $isObject ? $query->sql() : $query;
        $queryString = $this->_fromDualIfy($queryStringRaw);
        $yajraStatement = $this->_connection->prepare($queryString);
        $oci8Statement = new Oci8Statement($yajraStatement); //Need to override some un-implemented methods in yajra Oci8 "Statement" class
        $statement = new OracleStatement(new PDOStatement($oci8Statement, $this), $this); //And now wrap in a Cake-ified, bufferable Statement
        $statement->queryString = $queryStringRaw; //Oci8PDO does not correctly set read-only $queryString property, so we have a manual override
        if ($isObject) {
            if ($query->isBufferedResultsEnabled() === false || $query->type() != 'select') {
                $statement->bufferResults(false);
            }
        }
        return $statement;
    }
190537
public function action(string $query, array $params = [])
    {
        // Prepares the query, then stores it
        $PDOStatement = $this->pdo->prepare($query);

        // Executes the query, then returns the boolean value
        return $PDOStatement->execute($params);
    }
1277561
public function exec($query)
    {
        $stmt = $this->getWye()->makeStatement($query, []);

        $stmt->execute();

        return $stmt->rowCount() !== null ? $stmt->rowCount() : 0;
    }
1150993
protected static function isValidQuery(?string $query): bool
    {
        if ($query === null || $query === '') {
            return true;
        }

        // http://tools.ietf.org/html/rfc3986#section-3.4
        // query = *( pchar / "/" / "?" )
        // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
        $pattern = sprintf(
            '/\A(?:[%s%s\/?:@]|(?:%s))*\z/',
            static::UNRESERVED_SET,
            static::SUB_DELIMS_SET,
            static::PCT_ENCODED_SET
        );

        return !!preg_match($pattern, $query);
    }
918264
public function getValue($query)
    {
        $this->statement = $this->db->query($query);
        if ($this->statement) {
            $value = $this->statement->fetch(\PDO::FETCH_BOTH);
            if (!empty($value[0])) {
                return $value[0];
            }
        }
        return false;
    }
27239
public function logAction($query) {
        $interval = Configure::read('Admin.logActions.interval') ?: '-6 hours';

        $conditions = $query;
        $conditions['created >='] = date('Y-m-d H:i:s', strtotime($interval));

        $count = $this->find('count', array(
            'conditions' => $conditions
        ));

        if ($count) {
            return true;
        }

        $this->create();

        return $this->save($query, false);
    }
217302
static public function isSql($query)
    {
        if (is_string($query) && !is_numeric($query)) {
            if (preg_match('/^\s*(select|insert|update|delete|show|create|alter|rename|drop|grant|revoke|exec|TRUNCATE|set|declare)\s+/i', $query)) {
                return true;
            }
        }
        return false;
    }