我正在使用skife来帮助我的数据库查询。我有下面的查询和方法。@Bind("to")int to);org.postgresql.util.PSQLException: ERROR: argument of AND must be type boolean, not type bigintselect * from profile where profile_id >= 1 and profile_id < 50
我的RDBMS
我似乎找不到一个共同的表达,基本上是在SQL Server上我必须这样做(这非常令人困惑,因为位类型的默认值必须为true或false,但您不能将它们赋值为true或false,也不能对其进行测试)在PostgreSQL上我必须这样做select * from table where booleancol is false
在我们的程序中
我需要在postgres的预准备语句中添加一个条件。伪代码(不起作用,触发错误"argument of WHERE必须是类型boolean,不是类型文本“): if (nameFilter) {}
let query = prepare("SELECT * FROM users WHERE name LIKE $1", likeP