@param QueryInterface $query

@return Result|null
@throws Exception
345994
public function process(QueryInterface $query)
    {
        if (!$query instanceof ShowQuery || $query->getObject() !== ShowQuery::EXPRESSION_TABLES) {
            return null;
        }

        $tablet = $this->tablet->getTablet();
        $command = new GetSchema($tablet->getAlias());
        /* @var $vtCtldResult GetSchemaResult */
        $vtCtldResult = $this->client->executeCommand($command);

        return new Tables($vtCtldResult);
    }
922055
public function executeRead(QueryInterface $query, array $params = [])
    {
        $cursor = null;

        try {
            $reader = $this->connection;
            $tabletType = $this->clusterConfig->getReadFrom();

            if ($this->isInTransaction()) {
                $reader = $this->getTransaction();
                $tabletType = TabletType::MASTER;
            }

            $cursor = $reader->execute($this->ctx, $query->getSql(), $params, $tabletType);
        } catch (VitessException $e) {
            $this->handleException($e);

            return new Result(null, $e);
        }

        return new Result(new Cursor($cursor));
    }
834826
public function query($query) {
    if(method_exists($this->db, 'query')) {
      return $this->db->query($query);
    } else {
      throw new Exception(__METHOD__ . " not implemented");
    }
  }
297748
public function handle(QueryInterface $query)
    {
        $data = $this->configurationFileReader->getData();

        return $this->getConfigurationDataResponse($data);
    }
290178
public function executeQuery($query = null)
    {
        $connection = $this->getConnection();
        
        $connection->transaction(function (ConnectionInterface $connection) use ($query) {
            $connection->execute($query);
        });
        
        return $connection->affectedRows();
    }
380455
protected function query(QueryInterface $query)
    {
        $metadata = $this->getClassMetadata();

        foreach ($metadata->getFieldMappings() as $field) {
            $fieldtype = $this->getFieldManager()->get($field['fieldtype'], $field);
            if ($fieldtype instanceof FieldTypeInterface) {
                $fieldtype->query($query, $metadata);
            }
        }
    }
5277
protected function executeQuery($query)
        {
            $res = @odbc_exec($this->_lnk, $query);
            if(!$res) {
                $error = odbc_errormsg($this->_lnk);
                $this->log('Query failed: '.$error);
                throw new Exception('Executing query failed ' . $error, self::QUERY_FAILED);
            }
            return $res;
        }
801940
public function apply(QueryObjectInterface $query)
    {
        /** @var QueryFilterInterface $filter */
        foreach ($this->data as $filter) {
            $filter->apply($query);
        }
        return $this;
    }
1023759
public function exec($query)
    {
        try {
            $this->connection->exec($query);
        } catch (DBALException $e) {
            throw new QueryException($e->getMessage(), $e->getCode(), $e);
        }
    }
1047596
protected function getResults($query)
    {
         $searchFields = ($this->getSearchFields() ?: singleton($this->sourceObject)->stat('searchable_fields'));

        if(!$searchFields) {
            throw new Exception(
                sprintf('HasOneAutocompleteField: No searchable fields could be found for class "%s"',
                $this->sourceObject));
        }

        $params = [];
        $sort = [];
        
        foreach($searchFields as $searchField) {
            $name = (strpos($searchField, ':') !== FALSE) ? $searchField : "$searchField:PartialMatch:nocase";
            $params[$name] = $query;
            $sort[$searchField] = "ASC";
        }

        $results = DataList::create($this->sourceObject)
            ->filterAny($params)
            ->sort($sort)
            ->limit($this->getResultsLimit());

        return $results;
    }
194099
public function findPending(QueryInterface $query, array $options) : QueryInterface
    {
        $query->where([
            'import_id' => $options['import']->id,
            'status' => static::STATUS_PENDING
        ]);

        return $query;
    }
138216
function ExecuteQuery($query)
    {
        $this->lastQuery = $query;
        $result = mysqli_query($this->db, $query);
        $this->AssertSuccess();

        if ($result instanceof \mysqli_result)
            return new Reader($result);

        return null;
    }
1049822
public function queryLimitHelper(BuilderInterface $query)
    {
        // only apply limit if we are NOT checking the count
        $limit = $this->searchHelper->getLimit();
        $offset = $this->searchHelper->getOffset();
        if ($offset and $limit) {
            $query->limit($limit, $offset);
        } elseif ($limit) {
            $query->limit($limit);
        } else {
            // can't have an offset w/o an limit
            throw new HTTPException("A bad query was attempted.", 500, array(
                'dev' => "Encountered an offset clause w/o a limit which is a no-no.",
                'code' => '894791981'
            ));
        }

        return $query;
    }
1288644
public function executeWrite(QueryInterface $query, array $params = [])
    {
        $result = $this->mysqlEmulator->getResult($query);

        if ($result) {
            return $result;
        }

        return $this->vitess->executeWrite($query, $params);
    }
173498
function execute(WriterInterface $query, callable $callback) {
		$this->result = null;
		$this->query = $query;
		$this->notify();
		
		list($context, $resolver) = $this->prepareCallbacks(
			function(\pq\Result $result) {
				$this->result = $result;
				$this->notify();
				return $result;
			}, $callback);
		$this->getConnection()->execParamsAsync($query, $query->getParams(), 
			$query->getTypes(), $resolver);
		return $context;
	}
110461
public function query( SqlInterface $query, $options = 0 )
    {

        $options += $options & ( self::RECONNECT_AS_REQUIRED | self::RECONNECT_NO ) ? 0 : self::RECONNECT_DEFAULT;

        $this->numQuerys++;

        $timings = array();
        $timings['start'] = microtime( true );

        $sql = $query->parse( $this );
        $timings['query_parsed'] = microtime( true );

        $this->debug->emit( Debug::INFO, self::QUERY_PARSED, $sql );

        // debugging search path pest
        // $search_path = pg_query( $this->resource->get(), "SHOW search_path"); $result = pg_fetch_row( $search_path ); d_pr( $result );

        // set exception
        $resource = $this->resource->get( $options & self::RECONNECT_AS_REQUIRED );

        try {

            // really ghetto debuggin for when shit really hits the fan
            // file_put_contents( '~/sqllog.out', "{$sql}\n\n", FILE_APPEND );

            // execute query
            if( false === $result = @pg_query( $resource, $sql ) ) {
                throw new \Exception();
            }

        } catch( \Exception $e ) {

            $exceptionFactory = new QueryExceptionFactory( $resource, $sql, $this->debug );
            throw $exceptionFactory->get();

        }

        $timings['query_executed'] = microtime( true );
        $timings['total'] = $timings['query_executed'] - $timings['start'];
        $timings['parsing'] = $timings['query_parsed'] - $timings['start'];
        $timings['total'] = $timings['query_executed'] - $timings['query_parsed'];

        $this->debug->emit( self::QUERY_OK, $sql, $timings );

        $resultResourceObject = new Result( $result, $this, $query, $timings );

        return $resultResourceObject;

    }
1138914
public function selectOne($query, $bindings = [])
    {
        $start = $this->getLogTime();

        try {

            $result = $this->wpdb->get_row($this->bindParams($query, $bindings));

            if ($result === false || $this->wpdb->last_error) {
                throw new QueryException($query, $bindings, new \Exception($this->wpdb->last_error));
            }

            return $result;

        } catch (QueryException $e) {
            throw $e;
        } finally {
            $this->logQuery($query, $bindings, $this->getElapsedTime($start));
        }
    }