【发布时间】:2019-11-19 21:06:49
【问题描述】:
我正在学习这个很棒的库,但是虽然简单的查询有效,但我很困惑如何编写库常见问题解答中没有的东西。
例如,
create table if not exists ticks
(id bigserial not null constraint ticks_pkey primary key,
timestamp timestamp not null
);
可以这样写
select coalesce(max(id), 0) from ticks where timestamp::date = ?
其实我这里有两个问题
column.max() 没有任何合适的修饰符,例如,function() 不接受任何参数。也许,我可以在获取行后在代码中模拟它。
我不知道如何在 where 中进行强制转换或编写任意 where 条件。
【问题讨论】:
标签: postgresql kotlin kotlin-exposed