【发布时间】:2016-11-13 20:18:50
【问题描述】:
我在 SO 中发现了一些与此问题相关的问题,但对我没有多大帮助。我想使用 GreenDao 库在 Android 中构建一个查询,查询应该以日期时间的降序获取包含特定电话号码的所有行,我还想按组名对它们进行分组。 我的查询:
List<activity> activities = activityDao.queryBuilder().where(Properties.Contact_number.eq(phonenumber)).orderDesc(Properties.Date_time).build().list();
如何在上述查询中包含 GROUP BY 以便按 group_name 对行进行分组(我有 group_name 作为表中的列)?
我在GreenDao中没有找到任何GROUP BY方法,不知道我是否正确。
【问题讨论】:
标签: android sqlite greendao greendao-generator