Objectify queries: filter by date

流过昼夜 提交于 2019-12-01 08:45:08
  1. Your column needs to be indexed

    @Indexed protected Date dateCreated;

  2. You can sort only by one column in a request (> and < and != are all considered sorting since the index is sorted, then analyzed)

  3. You can group dates by loosing precision: 2012-11-29 16:03:59.494000 becomes 2012-11-29 this way, you can use == safely. Create a column for each precision you want (day, week, month). In general, try relying the least possible on sorting operations: sooner or later you will be happy for that choice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!