private function execute($str_method, ProtocolMessage $obj_request, ProtocolMessage $obj_response)
    {
        try {
            ApiProxy::makeSyncCall('datastore_v4', $str_method, $obj_request, $obj_response, 60);
            $this->obj_last_response = $obj_response;
        } catch (ApplicationError $obj_exception) {
            $this->obj_last_response = NULL;
            if($obj_request instanceof RunQueryRequest && 'GQL not supported.' === $obj_exception->getMessage()) {
                $this->executeGqlAsBasicQuery($obj_request); // recursive
            } elseif (FALSE !== strpos($obj_exception->getMessage(), 'too much contention') || FALSE !== strpos($obj_exception->getMessage(), 'Concurrency')) {
                // LIVE: "too much contention on these datastore entities. please try again." LOCAL : "Concurrency exception."
                throw new Contention('Datastore contention', 409, $obj_exception);
            } else {
                throw $obj_exception;
            }
        }
        return $this->obj_last_response;
    }
private function execute($str_method, ProtocolMessage $obj_request, ProtocolMessage $obj_response)
    {
        try {
            ApiProxy::makeSyncCall('datastore_v4', $str_method, $obj_request, $obj_response, 60);
            $this->obj_last_response = $obj_response;
        } catch (ApplicationError $obj_exception) {
            $this->obj_last_response = NULL;
            if($obj_request instanceof RunQueryRequest && 'GQL not supported.' === $obj_exception->getMessage()) {
                $this->executeGqlAsBasicQuery($obj_request); // recursive
            } elseif (FALSE !== strpos($obj_exception->getMessage(), 'too much contention') || FALSE !== strpos($obj_exception->getMessage(), 'Concurrency')) {
                // LIVE: "too much contention on these datastore entities. please try again." LOCAL : "Concurrency exception."
                throw new Contention('Datastore contention', 409, $obj_exception);
            } else {
                throw $obj_exception;
            }
        }
        return $this->obj_last_response;
    }
private function execute ( $ str_method , ProtocolMessage $ obj_request , ProtocolMessage $ obj_response ) { try { ApiProxy :: makeSyncCall ( 'datastore_v4' , $ str_method , $ obj_request , $ obj_response , 60 ) ; $ this -> obj_last_response = $ obj_response ; } catch ( ApplicationError $ obj_exception ) { $ this -> obj_last_response = NULL ; if ( $ obj_request instanceof RunQueryRequest && 'GQL not supported.' === $ obj_exception -> getMessage ( ) ) { $ this -> executeGqlAsBasicQuery ( $ obj_request ) ; // recursive } elseif ( FALSE !== strpos ( $ obj_exception -> getMessage ( ) , 'too much contention' ) || FALSE !== strpos ( $ obj_exception -> getMessage ( ) , 'Concurrency' ) ) { // LIVE: "too much contention on these datastore entities. please try again." LOCAL : "Concurrency exception." throw new Contention ( 'Datastore contention' , 409 , $ obj_exception ) ; } else { throw $ obj_exception ; } } return $ this -> obj_last_response ; }
Execute a method against the Datastore

Use Google's static ApiProxy method

Will attempt to convert GQL queries in local development environments

@param $str_method
@param ProtocolMessage $obj_request
@param ProtocolMessage $obj_response
@return mixed
@throws ApplicationError
@throws \google\appengine\runtime\CapabilityDisabledError
@throws \google\appengine\runtime\FeatureNotEnabledError
@throws Contention
Execute a method against the Datastore