【发布时间】:2019-11-01 07:38:58
【问题描述】:
我正在使用 Spring Data cassandra
我的这段代码正在运行
@Query("SELECT count(*) as cnt FROM notifications where userid = ?0 and typeofnotification=?1 "
+ "and notificationId > minTimeuuid('2019-09-12') and category = ?3 allow filtering")
public Integer findCountForCategoryForDate(int userId, String typeOfNotification, String category);
但是当我尝试将日期作为参数时,它给出了错误
@Query("SELECT count(*) as cnt FROM notifications where userid = ?0 and typeofnotification=?1 "
+ "and notificationId > minTimeuuid(?2) and category = ?3 allow filtering")
public Integer findCountForCategoryForDate(int userId, String typeOfNotification,String date, String category);
我错过了什么?
notificationId 列是 DB 中的 timeuuid
【问题讨论】:
标签: cassandra spring-data-cassandra