1

I am using jOOQ with PostgreSQL, and I just realize that my column is case sensitive. Using jOOQ, I didn't found a correct method to query a column, ignoring its case sensitivity. Looking at here : jOOQ TableField Method, I can see that there's equalIgnoreCase. But in the jooq class itself, that method is not there.

Does anybody know what did I do wrong here?

4

1 回答 1

4

我不太确定“区分大小写”是指列内容还是列名。

  • 如果您的意思是列内容,那么您找到了正确的方法:Field.equalIgnoreCase(). 一个使用示例:

    create.select()
          .from(MY_TABLE)
          .where(MY_TABLE.MY_FIELD.equalIgnoreCase("abc"))
          .fetch();
    
  • 但是,如果您指的是列名,那么您可以使用Factory Settings来控制 jOOQ 如何呈现字段和列名。相关设置是RenderNameStyle

于 2012-05-24T15:47:14.293 回答