<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>右舷 &#187; google app engine</title>
	<atom:link href="http://www.laihj.net/tag/google-app-engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laihj.net</link>
	<description>list(linux,emacs,旅行,读书,andriod)</description>
	<lastBuildDate>Tue, 20 Jul 2010 01:52:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[GAE笔记]GQL参考</title>
		<link>http://www.laihj.net/2009/03/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83/</link>
		<comments>http://www.laihj.net/2009/03/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 11:09:17 +0000</pubDate>
		<dc:creator>laihj</dc:creator>
				<category><![CDATA[善其事]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[GAL]]></category>
		<category><![CDATA[google app engine]]></category>

		<guid isPermaLink="false">http://www.laihj.net/articles/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83.html</guid>
		<description><![CDATA[
  SELECT * FROM &#60;kind&#62;
    [WHERE &#60;condition&#62; [AND &#60;condition&#62; ...]]
    [ORDER BY &#60;property&#62; [ASC &#124; DESC] [, &#60;property&#62; [ASC &#124; DESC] ...]]
    [LIMIT [&#60;offset&#62;,]&#60;count&#62;]
    [OFFSET &#60;offset&#62;]

  &#60;condition&#62; := &#60;property&#62; {&#60; &#124; &#60;= &#124; &#62; &#124; &#62;= &#124; = &#124; != } [...]]]></description>
			<content:encoded><![CDATA[<blockquote></blockquote>
<pre>  SELECT * FROM &lt;kind&gt;
    [WHERE &lt;condition&gt; [AND &lt;condition&gt; ...]]
    [ORDER BY &lt;property&gt; [ASC | DESC] [, &lt;property&gt; [ASC | DESC] ...]]
    [LIMIT [&lt;offset&gt;,]&lt;count&gt;]
    [OFFSET &lt;offset&gt;]

  &lt;condition&gt; := &lt;property&gt; {&lt; | &lt;= | &gt; | &gt;= | = | != } &lt;value&gt;
  &lt;condition&gt; := &lt;property&gt; IN &lt;list&gt;
  &lt;condition&gt; := ANCESTOR IS &lt;entity or key&gt;</pre>
<blockquote></blockquote>
<ul>
<li>关键字大小写不敏感，类型与属性名是大小写敏感的。</li>
</ul>
<ul>
<li>GQL只有select语句，返回的是一个或多个实例</li>
</ul>
<ul>
<li>filed总是*,就是查询所有列。保留SQL的句法是习惯问题</li>
</ul>
<ul>
<li>GQL查询不支持join语句</li>
</ul>
<ul>
<li>支持关键字AND,不支持OR.使用IN语句来部分实现OR的功能.</li>
</ul>
<ul>
<li>使用IN的时候，实际上是在后台运行了多条select语句，然后返回结果(结果中去除了重复数据).在一条语句中允许进行最多30个Datastore的查询</li>
</ul>
<ul>
<li>字符串中的转义字符是&#8217;,比如&#8217;Joe&#8217;&#8217;s Diner&#8217;</li>
</ul>
<ul>
<li>LIMIT类似于TOP</li>
</ul>
<ul>
<li>
<pre>OFFSET 2   结果集偏移两位</pre>
</li>
<li>查询相关用户的列(userproperty) :SELECT * FROM Greeting WHERE author = USER(&#8217;hamainterATgmail.com&#8217;)</li>
</ul>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://www.209y.cn" >减肥食谱</a> : <a class="comment_content" href="http://www.laihj.net/2009/03/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83/#comment-27" title="View the entire comment by 减肥食谱" >有幸拜读</a></li>
<li><a class="commentor" href="http://www.409t.cn" >减肥经历</a> : <a class="comment_content" href="http://www.laihj.net/2009/03/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83/#comment-26" title="View the entire comment by 减肥经历" >努力</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.laihj.net/2009/03/gae%e7%ac%94%e8%ae%b0gql%e5%8f%82%e8%80%83/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
