GQL query help - How can I write a query with where clause in GQL ? I am using google appengine datastore

回眸只為那壹抹淺笑 提交于 2020-01-24 12:02:09

问题


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 ??


回答1:


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



来源:https://stackoverflow.com/questions/2660057/gql-query-help-how-can-i-write-a-query-with-where-clause-in-gql-i-am-using-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!