function runQuery(\Plasma\QueryBuilderInterface $query): \React\Promise\PromiseInterface {
        if($this->goingAway) {
            return \React\Promise\reject((new \Plasma\Exception('Client is closing all connections')));
        }
        
        $connection = $this->getOptimalConnection();
        
        try {
            return $connection->runQuery($this, $query);
        } catch (\Throwable $e) {
            $this->checkinConnection($connection);
            throw $e;
        }
    }
function runQuery(\Plasma\QueryBuilderInterface $query): \React\Promise\PromiseInterface {
        if($this->goingAway) {
            return \React\Promise\reject((new \Plasma\Exception('Client is closing all connections')));
        }
        
        $connection = $this->getOptimalConnection();
        
        try {
            return $connection->runQuery($this, $query);
        } catch (\Throwable $e) {
            $this->checkinConnection($connection);
            throw $e;
        }
    }
function runQuery ( \ Plasma \ QueryBuilderInterface $ query ) : \ React \ Promise \ PromiseInterface { if ( $ this -> goingAway ) { return \ React \ Promise \ reject ( ( new \ Plasma \ Exception ( 'Client is closing all connections' ) ) ) ; } $ connection = $ this -> getOptimalConnection ( ) ; try { return $ connection -> runQuery ( $ this , $ query ) ; } catch ( \ Throwable $ e ) { $ this -> checkinConnection ( $ connection ) ; throw $ e ; } }
Runs the given querybuilder on an underlying driver instance.
The driver CAN throw an exception if the given querybuilder is not supported.
An example would be a SQL querybuilder and a Cassandra driver.
@param \Plasma\QueryBuilderInterface  $query
@return \React\Promise\PromiseInterface
@throws \Plasma\Exception
Runs the given querybuilder on an underlying driver instance . The driver CAN throw an exception if the given querybuilder is not supported . An example would be a SQL querybuilder and a Cassandra driver .