FastQuery v1.0.8 发布,数据持久层框架
public interface UserInfoDBService extends QueryRepository {// countField : 明确指定求和字段count(countField),默认值是"id"
@Query(value="select id,name,age from `userinfo` where 1",countField="id")
Page findAll(Pageable pageable);
// 如果没有指定求和语句,那么由fastquery分析出最优的求和语句
@Query("select id,name,age from `userinfo` #{#where}")
@Condition(l="age",o=Operator.GT,r="?1") // age > ?1
@Condition(c=COperator.AND,l="id",o=Operator.LT,r="?2") // id ?1
@Condition(c=COperator.AND,l="id",o=Operator.LT,r="?2") // id
页:
[1]