GQL查询帮助 - 如何使用GQL中的where子句编写查询?我正在使用谷歌appengine数据存储 [英] GQL query help - How can I write a query with where clause in GQL ? I am using google appengine datastore

查看:119
本文介绍了GQL查询帮助 - 如何使用GQL中的where子句编写查询?我正在使用谷歌appengine数据存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表格中有三条记录
示例:

  *用户名* *电子邮件* *城市* 
Nick nick@example.com伦敦
Vikky vicky@example.com巴黎
Lisa lisa@example.com悉尼

现在我想获得具体的记录保存电子邮件ID作为关键字,



SQL查询可能是这样的

  select * from table1 where email =vicky@example.com

上面的等价GQL查询是什么?

解决方案

  SELECT * FROM table1 WHERE email ='vic​​ky@example.com'

应该在GQL中正常工作。

详情请参阅此处
http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html


I have three records in a table example:

*Usernames*        *email*                *city*
Nick            nick@example.com        London
Vikky           vicky@example.com       Paris
Lisa            lisa@example.com        Sydney

Now I want to get specific record keeping email ID as a key ,

SQL query may be like this

select * from table1 where email = "vicky@example.com" 

What is the equivalent GQL query for the above ??

解决方案

SELECT * FROM table1 WHERE email = 'vicky@example.com' 

should work fine in GQL.

See here for more information http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html

这篇关于GQL查询帮助 - 如何使用GQL中的where子句编写查询?我正在使用谷歌appengine数据存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆