[英]Is GQL the same language used for google app engine and google cloud datastore?
I'm new studing and using GQL. 我是新手,正在使用GQL。 I've been seen GQL grammar here: https://developers.google.com/appengine/docs/python/datastore/gqlreference and here: https://developers.google.com/datastore/docs/concepts/gql_reference . 我在以下网址看到过GQL语法: https : //developers.google.com/appengine/docs/python/datastore/gqlreference和此处: https : //developers.google.com/datastore/docs/concepts/gql_reference 。 Are very similar, but I wasn't complete sure. 非常相似,但是我不确定。
For example, for bound parameter values in Google app engine are used like this: 例如,对于Google app引擎中的绑定参数值,使用方式如下:
employees_trained = db.GqlQuery("SELECT * FROM Employee WHERE email IN :1",
training_registration_list)
With ":" before the argument, but for Google Cloud Datastore is with "@", like this: 在参数前使用“:”,但对于Google Cloud Datastore,则使用“ @”,如下所示:
query_string = ('SELECT * FROM Person WHERE height >= @minHeight '
'AND height <= @maxHeight')
gql_query.query_string = query_string
query_arg = gql_query.name_arg.add()
query_arg.name = 'minHeight'
query_arg.value.integer_value = 48
query_arg = gql_query.name_arg.add()
query_arg.name = 'maxHeight'
query_arg.value.integer_value = 60
Sorry if this is a silly question, but I wasn't sure if the same GQL is used either in Google App Engine and Google Cloud Datastore 抱歉,这是一个愚蠢的问题,但是我不确定Google App Engine和Google Cloud Datastore是否使用了相同的 GQL
Thanks in advance! 提前致谢!
您链接到的页面上有完整的差异列表: https : //developers.google.com/datastore/docs/concepts/gql_reference#unsupported_features_and_behavior_differences_from_mysqlpython_gql (单击选项卡“用于App Engine差异的Python GQL”)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.