private function executeGqlAsBasicQuery(ProtocolMessage $obj_gql_request)
    {
        // Set up the new request
        $obj_query_request = $this->setupRunQuery();
        $obj_query = $obj_query_request->mutableQuery();

        // Transfer any transaction data to the new request
        /** @var RunQueryRequest $obj_gql_request */
        if($obj_gql_request->mutableReadOptions()->hasTransaction()) {
            $obj_query_request->mutableReadOptions()->setTransaction($obj_gql_request->mutableReadOptions()->getTransaction());
        }

        // Parse the GQL string
        $obj_gql_query = $obj_gql_request->getGqlQuery();
        $obj_parser = new ProtoBufGQLParser($this->obj_schema);
        $obj_parser->parse($obj_gql_query->getQueryString(), $obj_gql_query->getNameArgList());

        // Start applying to the new RunQuery request
        $obj_query->addKind()->setName($obj_parser->getKind());
        foreach($obj_parser->getOrderBy() as $arr_order_by) {
            $obj_query->addOrder()->setDirection($arr_order_by['direction'])->mutableProperty()->setName($arr_order_by['property']);
        }

        // Limits, Offsets, Cursors
        $obj_parser->getLimit() && $obj_query->setLimit($obj_parser->getLimit());
        $obj_parser->getOffset() && $obj_query->setOffset($obj_parser->getOffset());
        $obj_parser->getStartCursor() && $obj_query->setStartCursor($obj_parser->getStartCursor());
        // @todo @ $obj_query->setEndCursor();

        // Filters
        $int_filters = count($obj_parser->getFilters());
        if(1 === $int_filters) {
            $this->configureFilterFromGql($obj_query->mutableFilter()->mutablePropertyFilter(), $obj_parser->getFilters()[0]);
        } else if (1 < $int_filters) {
            $obj_composite_filter = $obj_query->mutableFilter()->mutableCompositeFilter()->setOperator(\google\appengine\datastore\v4\CompositeFilter\Operator::AND_);
            foreach ($obj_parser->getFilters() as $arr_filter) {
                $this->configureFilterFromGql($obj_composite_filter->addFilter()->mutablePropertyFilter(), $arr_filter);
            }
        }
        return $this->execute('RunQuery', $obj_query_request, new RunQueryResponse());
    }
private function executeGqlAsBasicQuery(ProtocolMessage $obj_gql_request)
    {
        // Set up the new request
        $obj_query_request = $this->setupRunQuery();
        $obj_query = $obj_query_request->mutableQuery();

        // Transfer any transaction data to the new request
        /** @var RunQueryRequest $obj_gql_request */
        if($obj_gql_request->mutableReadOptions()->hasTransaction()) {
            $obj_query_request->mutableReadOptions()->setTransaction($obj_gql_request->mutableReadOptions()->getTransaction());
        }

        // Parse the GQL string
        $obj_gql_query = $obj_gql_request->getGqlQuery();
        $obj_parser = new ProtoBufGQLParser($this->obj_schema);
        $obj_parser->parse($obj_gql_query->getQueryString(), $obj_gql_query->getNameArgList());

        // Start applying to the new RunQuery request
        $obj_query->addKind()->setName($obj_parser->getKind());
        foreach($obj_parser->getOrderBy() as $arr_order_by) {
            $obj_query->addOrder()->setDirection($arr_order_by['direction'])->mutableProperty()->setName($arr_order_by['property']);
        }

        // Limits, Offsets, Cursors
        $obj_parser->getLimit() && $obj_query->setLimit($obj_parser->getLimit());
        $obj_parser->getOffset() && $obj_query->setOffset($obj_parser->getOffset());
        $obj_parser->getStartCursor() && $obj_query->setStartCursor($obj_parser->getStartCursor());
        // @todo @ $obj_query->setEndCursor();

        // Filters
        $int_filters = count($obj_parser->getFilters());
        if(1 === $int_filters) {
            $this->configureFilterFromGql($obj_query->mutableFilter()->mutablePropertyFilter(), $obj_parser->getFilters()[0]);
        } else if (1 < $int_filters) {
            $obj_composite_filter = $obj_query->mutableFilter()->mutableCompositeFilter()->setOperator(\google\appengine\datastore\v4\CompositeFilter\Operator::AND_);
            foreach ($obj_parser->getFilters() as $arr_filter) {
                $this->configureFilterFromGql($obj_composite_filter->addFilter()->mutablePropertyFilter(), $arr_filter);
            }
        }
        return $this->execute('RunQuery', $obj_query_request, new RunQueryResponse());
    }
private function executeGqlAsBasicQuery ( ProtocolMessage $ obj_gql_request ) { // Set up the new request $ obj_query_request = $ this -> setupRunQuery ( ) ; $ obj_query = $ obj_query_request -> mutableQuery ( ) ; // Transfer any transaction data to the new request /** @var RunQueryRequest $obj_gql_request */ if ( $ obj_gql_request -> mutableReadOptions ( ) -> hasTransaction ( ) ) { $ obj_query_request -> mutableReadOptions ( ) -> setTransaction ( $ obj_gql_request -> mutableReadOptions ( ) -> getTransaction ( ) ) ; } // Parse the GQL string $ obj_gql_query = $ obj_gql_request -> getGqlQuery ( ) ; $ obj_parser = new ProtoBufGQLParser ( $ this -> obj_schema ) ; $ obj_parser -> parse ( $ obj_gql_query -> getQueryString ( ) , $ obj_gql_query -> getNameArgList ( ) ) ; // Start applying to the new RunQuery request $ obj_query -> addKind ( ) -> setName ( $ obj_parser -> getKind ( ) ) ; foreach ( $ obj_parser -> getOrderBy ( ) as $ arr_order_by ) { $ obj_query -> addOrder ( ) -> setDirection ( $ arr_order_by [ 'direction' ] ) -> mutableProperty ( ) -> setName ( $ arr_order_by [ 'property' ] ) ; } // Limits, Offsets, Cursors $ obj_parser -> getLimit ( ) && $ obj_query -> setLimit ( $ obj_parser -> getLimit ( ) ) ; $ obj_parser -> getOffset ( ) && $ obj_query -> setOffset ( $ obj_parser -> getOffset ( ) ) ; $ obj_parser -> getStartCursor ( ) && $ obj_query -> setStartCursor ( $ obj_parser -> getStartCursor ( ) ) ; // @todo @ $obj_query->setEndCursor(); // Filters $ int_filters = count ( $ obj_parser -> getFilters ( ) ) ; if ( 1 === $ int_filters ) { $ this -> configureFilterFromGql ( $ obj_query -> mutableFilter ( ) -> mutablePropertyFilter ( ) , $ obj_parser -> getFilters ( ) [ 0 ] ) ; } else if ( 1 < $ int_filters ) { $ obj_composite_filter = $ obj_query -> mutableFilter ( ) -> mutableCompositeFilter ( ) -> setOperator ( \ google \ appengine \ datastore \ v4 \ CompositeFilter \ Operator :: AND_ ) ; foreach ( $ obj_parser -> getFilters ( ) as $ arr_filter ) { $ this -> configureFilterFromGql ( $ obj_composite_filter -> addFilter ( ) -> mutablePropertyFilter ( ) , $ arr_filter ) ; } } return $ this -> execute ( 'RunQuery' , $ obj_query_request , new RunQueryResponse ( ) ) ; }
Take a GQL RunQuery request and convert to a standard RunQuery request

Always expected to be called in the stack ->gql()->execute()->runGqlAsBasicQuery()

@param ProtocolMessage $obj_gql_request
@return null
@throws \GDS\Exception\GQL
Take a GQL RunQuery request and convert to a standard RunQuery request