【问题标题】:How do I query in Google Datastore Viewer where table or column name has slash in it?如何在 Google Datastore Viewer 中查询表或列名称中包含斜线的位置?
【发布时间】:2016-09-11 22:51:38
【问题描述】:

在 Google 数据存储区中,我有一个名称中带有斜线的表 (Kind)。

在旧的Datastore Viewer GUI 中,我可以运行

select * from "foo/bar"

带双引号。所以,foo/bar 一个有效的表名。

但在新的 GUI 中,Datastore Console,我无法做到这一点。

我明白了

GQL query error: Encountered ""foo/bar"" at line 1, column 15. 
Was expecting one of: <UNQUOTED_NAME>, <QUOTED_NAME>

见截图

如何查询此表? (反斜杠转义也不起作用。)

(我的问题也是关于出现同样问题的列。)

当旧的 GUI 关闭时,我将几乎完全无法访问我的数据。

【问题讨论】:

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


    【解决方案1】:

    你可以使用反引号。

    select * from `foo/bar`
    

    请注意它是`不是'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-02
      • 2015-08-05
      • 1970-01-01
      • 1970-01-01
      • 2020-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多