2017-07-24 70 views
1

我正在使用skife来帮助我处理数据库查询。我有下面的查询和方法。Postgres查询必须是布尔类型

@SqlQuery("select * from profile where profile_id >= :from and profile_id < :to") 
List<Profile> findAllInRange(@Bind("from")int from, @Bind("to")int to); 

我收到以下错误

org.postgresql.util.PSQLException: ERROR: argument of AND must be type boolean, not type bigint 

但如果我执行这个查询

select * from profile where profile_id >= 1 and profile_id < 50 

我RDBMS成功返回结果。

我错过了什么?

+0

解析它放置在\\操作<前一个布尔 – ja08prat

+0

@ ja08prat是什么意思呢?对不起,我很抱歉。 – MaxPower

+1

在'<'运营商 – MinMiguelM

回答

1

感谢MinMiguelM

我需要

+0

什么是背景? –

+1

更新到JDBI 2.x的最新版本 - 这应该修复< and >的错误解析。 – qualidafial

相关问题