Reputation: 23
Using datastore-api-v1.
Here is my sample code:
$obj_gateway = new GDS\Gateway\ProtoBuf("Test123"); $obj_schema = (new GDS\Schema("Messages")) ->addString('message_id') ->addString('type') ->addString('action') ->addInteger('to') ->addDatetime('created_at') ->addString('status') ->addString('message', FALSE); $obj_store = new GDS\Store($obj_schema,$obj_gateway); $query = "SELECT * FROM notifications WHERE `to` = 1 ORDER BY created_at"; $obj_store->query($query); $arr_page = $obj_store->fetchPage(10, 0);
This is the error:
Fatal error: Class 'google\appengine\datastore\v4\RunQueryRequest' not found in /usr/share/nginx/html/csfiles/third_party/gds/vendor/tomwalder/php-gds/src/GDS/Gateway/ProtoBuf.php on line 164
Upvotes: 1
Views: 76
Reputation: 1613
For anyone finding this, I have answered it on GitHub here
https://github.com/tomwalder/php-gds/issues/134#issuecomment-247261645
ProtoBuf is for AppEngine environments only. Use RESTv1 in non-AppEngine environments.
Cheers!
Upvotes: 1