2013-10-04 42 views
1

我在雲數據存儲中擁有我的實體。其中一個屬性是Localities,它是串聯的,例如。 洛杉磯;舊金山;拉斯維加斯。 現在我該怎樣得到它下面的查詢功能會給數據:在Google雲數據存儲中的LIKE查詢

SELECT * FROM CloudEntity其中類似「%舊金山%」

回答

4

代替存儲單個字符串各地,存儲字符串列表。然後使用一個相等過濾器。在JSON這將是:

Localities: {listValue: [ 
    {stringValue: "Los Angeles"}, 
    {stringValue: "San Francisco"}, 
    {stringValue: "Las Vegas"}]} 

則:

Select * from CloudEntity where Localities = "San Francisco" 
相關問題