【问题标题】:Is GQL the same language used for google app engine and google cloud datastore?GQL 是用于谷歌应用引擎和谷歌云数据存储的相同语言吗?
【发布时间】:2013-11-24 11:32:46
【问题描述】:

我是刚开始学习和使用 GQL。我在这里看到过 GQL 语法:https://developers.google.com/appengine/docs/python/datastore/gqlreference 和这里:https://developers.google.com/datastore/docs/concepts/gql_reference。非常相似,但我不完全确定。

例如,谷歌应用引擎中的绑定参数值是这样使用的:

employees_trained = db.GqlQuery("SELECT * FROM Employee WHERE email IN :1",
                            training_registration_list)

参数前带有“:”,但对于 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

抱歉,这是一个愚蠢的问题,但我不确定 Google App Engine 和 Google Cloud Datastore 中是否使用了相同 GQL

提前致谢!

【问题讨论】:

    标签: python google-app-engine google-cloud-datastore


    【解决方案1】:

    您链接到的页面有完整的差异列表: https://developers.google.com/datastore/docs/concepts/gql_reference#unsupported_features_and_behavior_differences_from_mysqlpython_gql (点击“Python GQL for App Engine 差异”选项卡)。

    【讨论】:

    • 起来!我没看到!谢谢!
    猜你喜欢
    • 2013-05-17
    • 2014-10-30
    • 2018-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多