网上论坛: http://groups.google.com/group/google-app-engine-cn-dev/topics
- 请问怎样用 JDO 查询总记录数? JDOQL怎么写? [1 条更新]
guangquanzhang <guangqu...@gmail.com> Jan 02 06:50PM +0800 ^
--
如题,谢谢
您收到此信息是由于您订阅了 Google 论坛“Google App Engine 中文开发组”论
坛。
要在此论坛发帖,请发电子邮件到 google-app-e...@googlegroups.com
要退订此论坛,请发邮件至
google-app-engine-...@googlegroups.com
更多选项,请通过
https://groups.google.com/group/google-app-engine-cn-dev?hl=zh-CN?hl=zh-CN
访问该论坛
On 1月3日, 下午10时33分, jun hu <risse...@gmail.com> wrote:
> code:
>
> String sql = null;
> sql = "SELECT count(id) FROM atta.blog.bean.Article";
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Query query = pm.newQuery(sql);
> query.setFilter("category == categoryParam");
> query.declareParameters("String categoryParam");
> int i;
> try {
> i = (Integer) query.execute("java");
> return i;
> } finally {
> query.closeAll();
> }
>
> 返回文章类别为java的文章总数。不知道有没有其他方法,但是我是这样做的。
>
> 2010/1/3 <google-app-engin...@googlegroups.com<google-app-engine-cn-dev %2Bno...@googlegroups.com>
>
>
>
>
>
>
>
> > 今日主题摘要
>
> > 网上论坛:http://groups.google.com/group/google-app-engine-cn-dev/topics
>
> > - 请问怎样用 JDO 查询总记录数? JDOQL怎么写? <#125f1c2aa55c6bb6_group_thread_0> [1
> > 条更新]
>
> > 主题: 请问怎样用 JDO 查询总记录数? JDOQL怎么写?<http://groups.google.com/group/google-app-engine-cn-dev/t/4f5ec97d1f3...>
>
> > guangquanzhang <guangquanzh...@gmail.com> Jan 02 06:50PM +0800 ^<#125f1c2aa55c6bb6_digest_top>
>
> > 如题,谢谢
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"Google App Engine 中文开发组"论
> > 坛。
> > 要在此论坛发帖,请发电子邮件到 google-app-e...@googlegroups.com
> > 要退订此论坛,请发邮件至
> > google-app-engine-...@googlegroups.com<google-app-engine-cn- dev%2Bunsu...@googlegroups.com>
> > 更多选项,请通过
> >https://groups.google.com/group/google-app-engine-cn-dev?hl=zh-CN?hl=...
网上论坛: http://groups.google.com/group/google-app-engine-cn-dev/topics
google app engine <cali...@gmail.com> Jan 08 12:50AM -0800 ^
超过1K条数据能得到吗?
--
您收到此信息是由于您订阅了 Google 论坛“Google App Engine 中文开发组”论
坛。
要在此论坛发帖,请发电子邮件到 google-app-e...@googlegroups.com
要退订此论坛,请发邮件至
google-app-engine-...@googlegroups.com