我一直在尝试对 QueryDSL 实施以下 SQL 查询
SQL
select count(*)
from table
where table.createDate=(
select MAX(table.createDate)
from table where table.primary_key='100'
) and table.key='100';
查询DSL
withSQL(
select(sqls.count)
.from(table.as(tab))
.where
.eq(table.createDate,
select(sqls.max(table.createDate))
.from(table.as(tab))
.where
.append(where))
.and(where)
).map(rs => rs.long(1))
.single
.apply()
.get
where
是keyValue=100
我使用 SQLSyntax 时的值
所以这给了我错误:-
not enough arguments for method eq: (implicit evidence$1: scalikejdbc.ParameterBinderFactory
Unspecified value parameter evidence$1.
.eq(table.createDate
任何人都可以帮忙吗?