我正在开发谷歌应用引擎的应用程序,但我遇到了一些使用我的应用引擎启动器上的GQL访问数据存储区的困难。我正在使用PHP-GDS库来访问数据存储区https://github.com/tomwalder/php-gds
仅当我使用Google App Engine Launcher时才会发生这种情况。部署应用程序后,一切都按预期工作。
调用堆栈
Uncaught exception 'google\appengine\runtime\ApplicationError'
Array
(
[type] => 0
[message] => GQL not supported.
[file] => C:\Program Files (x86)\Google\google_appengine\php\sdk\google\appengine\runtime\RealApiProxy.php
[line] => 53
[backtrace] => Array
(
[0] => Array
(
[file] => C:\Program Files (x86)\Google\google_appengine\php\sdk\google\appengine\runtime\ApiProxy.php
[line] => 40
[function] => makeSyncCall
[class] => google\appengine\runtime\RealApiProxy
[type] => ->
[args] => Array
(
[0] => datastore_v4
[1] => RunQuery
[2] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[3] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
[4] => 60
)
)
[1] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Gateway\ProtoBuf.php
[line] => 205
[function] => makeSyncCall
[class] => google\appengine\runtime\ApiProxy
[type] => ::
[args] => Array
(
[0] => datastore_v4
[1] => RunQuery
[2] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[3] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
[4] => 60
)
)
[2] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Gateway\ProtoBuf.php
[line] => 280
[function] => execute
[class] => GDS\Gateway\ProtoBuf
[type] => ->
[args] => Array
(
[0] => RunQuery
[1] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[2] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
)
)
[3] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Store.php
[line] => 256
[function] => gql
[class] => GDS\Gateway\ProtoBuf
[type] => ->
[args] => Array
(
[0] => SELECT * FROM `Book` ORDER BY __key__ ASC
[1] =>
)
)
[4] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\App\Http\Controller\Sandbox.php
[line] => 30
[function] => fetchAll
[class] => GDS\Store
[type] => ->
[args] => Array
(
)
)
[5] => Array
(
[function] => Execute
[class] => App\Http\Controller\Sandbox
[type] => ::
[args] => Array
(
)
)
[6] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\Oka\Web.php
[line] => 148
[function] => call_user_func_array
[args] => Array
(
[0] => Array
(
[0] => \App\Http\Controller\Sandbox
[1] => Execute
)
[1] => Array
(
)
)
)
[7] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\Oka\Web.php
[line] => 93
[function] => Execute
[class] => Oka\Web
[type] => ::
[args] => Array
(
)
)
[8] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Public\index.php
[line] => 30
[function] => Initialize
[class] => Oka\Web
[type] => ::
[args] => Array
(
)
)
[9] => Array
(
[file] => C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php
[line] => 147
[args] => Array
(
[0] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Public\index.php
)
[function] => require
)
)
)
从一些python文件调用异常
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\cloud_datastore_validator.py:
985
986
987: _assert_condition(not req.HasField('gql_query'), 'GQL not supported.')
988 _assert_initialized(req)
989 self.__entity_validator.validate_partition_id(READ,
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_stub_util.py:
3861
3862 datastore_pbs.check_conversion(not v1_req.HasField('gql_query'),
3863: 'GQL not supported')
3864 v3_query = datastore_pb.Query()
3865 self._query_converter.v1_to_v3_query(v1_req.partition_id, v1_req.query,
....
4212
4213 datastore_pbs.check_conversion(not v4_req.has_gql_query(),
4214: 'GQL not supported')
4215 v3_query = datastore_pb.Query()
4216 self._query_converter.v4_to_v3_query(v4_req.partition_id(), v4_req.query(),
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_v4_validator.py:
1063
1064
1065: _assert_condition(not req.has_gql_query(), 'GQL not supported.')
1066 _assert_initialized(req)
1067 self.validate_read_options(req.read_options())
4 matches across 3 files
我的App Engine Launcher不支持GQL吗?
答案 0 :(得分:1)
本地开发服务器目前不支持GQL - 只有实时数据存储环境。这是对Google SDK的限制。
我正在考虑向php-gds库添加一个基本的GQL解析器。请在此处注意您对此想法的支持(<或p>)
https://github.com/tomwalder/php-gds/issues/44
我想我也在这里更新了你的问题: