GQL node.js

GQL with node.js

是否有在 Node.js 中使用 Google Datastore GQL 的工作示例?

文档中的示例包含一个似乎不存在的 .execute 函数。

https://cloud.google.com/datastore/docs/concepts/gql

因此,我尝试使用常规回调方法,但未提取 GQL 语句。 我尝试使用 gql_query 和 gqlQuery 作为资源参数名称但无济于事。

store.datasets.runQuery(
        {
            "resource":
            {
                "gqlQuery":
                {
                    "queryString":"SELECT * from Messages LIMIT 50",
                    "allowLiterals":true
                }
            }

        }, 
        function(err, result, endCursor, apiResponse)
        {
...
    }

我可能已经找到答案了:

The docs 表示“... Google Java 的云客户端库支持 GQL,但其他 Google 云客户端库不支持。”

看起来他们已经添加了 Ruby,但仍然没有 Node.js :(

幸运的是,我需要等效于 GQL CONTAINS.filter('foo', '=', 'bar')(在一个数组值上)似乎工作正常。