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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -