public function execute($query = null, array $params = []) : object
    {
        // When using one argument and its array, assume its $params
        if (is_array($query)) {
            $params = $query;
            $query = null;
        }

        if (!$query) {
            $query = $this->getSQL();
        }

        return parent::execute($query, $params);
    }
public function execute($query = null, array $params = []) : object
    {
        // When using one argument and its array, assume its $params
        if (is_array($query)) {
            $params = $query;
            $query = null;
        }

        if (!$query) {
            $query = $this->getSQL();
        }

        return parent::execute($query, $params);
    }
public function execute ( $ query = null , array $ params = [ ] ) : object { // When using one argument and its array, assume its $params if ( is_array ( $ query ) ) { $ params = $ query ; $ query = null ; } if ( ! $ query ) { $ query = $ this -> getSQL ( ) ; } return parent :: execute ( $ query , $ params ) ; }
Execute a SQL-query.

@param string|null|array $query  the SQL statement (or $params)
@param array             $params the params array

@return self
Execute a SQL - query .