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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -