Google app engine Can';不要在Google应用程序启动器上使用GQL
我正在为GoogleAppEngine开发一个应用程序,但是在我的AppEngine启动器上使用GQL访问数据存储时遇到了一些困难。我正在使用PHP-GDS库访问数据存储 这只有在我使用谷歌应用引擎启动器时才会发生。部署应用程序后,一切都按预期进行 调用堆栈Google app engine Can';不要在Google应用程序启动器上使用GQL,google-app-engine,google-cloud-datastore,Google App Engine,Google Cloud Datastore,我正在为GoogleAppEngine开发一个应用程序,但是在我的AppEngine启动器上使用GQL访问数据存储时遇到了一些困难。我正在使用PHP-GDS库访问数据存储 这只有在我使用谷歌应用引擎启动器时才会发生。部署应用程序后,一切都按预期进行 调用堆栈 Uncaught exception 'google\appengine\runtime\ApplicationError' Array ( [type] => 0 [message] => GQL not s
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
有人知道为什么我的应用程序引擎启动器不支持GQL吗?本地开发服务器目前不支持GQL,只有实时数据存储环境支持GQL。这是对谷歌SDK的限制 我正在考虑向PHPGDS库添加一个基本的GQL解析器。请随时注意您是否支持此想法: 我想我也在这里更新了你的问题:
这不是我的问题,但谢谢!我还在问题#44下留下了一条评论,因此,对于任何可能感兴趣的人,我现在以内置解析器的形式向php gds库添加了基本的GQL支持。这意味着您可以在本地开发环境中运行基本的GQL查询。