playframework - How to get monthly data using scala & play with month parameter? -


i new scala , play , going make api using them. have made method take month parameter , return data month. date instant.

val querybymonth = compiled((month: rep[int]) => table.filter(_.date.getmonth === month)) def getmonthlydata(month: int) = db.run(querybymonth(month).result) 

n.b: _.date.getmonth === month psudo checking.
don't know how month instant query. should do?


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -