android - How to use GROUP BY in GreenDao -
i have found few questions related issue in so, did not me much.i want construct query in android using greendao library, query should grab rows containing particular phonenumber in descending order of datetime , want group them group name. query:
list<activity> activities = activitydao.querybuilder().where(properties.contact_number.eq(phonenumber)).orderdesc(properties.date_time).build().list();
how include group in above query group rows group_name
(i have group_name column in table)?
i did not find group method in greendao,not sure if correct.
group by
not supported greendao.
can use trick :
where(new wherecondition.stringcondition(properties.contact_number.eq(phonenumber) + "group group_name")).orderdesc(properties.date_time).build().list();
it let build clause using string.
Comments
Post a Comment