gpt4 book ai didi

android - ormlite:sql语句不像抛出异常

转载 作者:行者123 更新时间:2023-11-29 00:26:24 26 4
gpt4 key购买 nike

我使用 ormlite。我想执行“不像”的sql语句。

我使用了 not().like() 但出现异常“无法添加:NOT without comparison”。

我做错了什么?我已经在 ormlite 中寻找使用“不喜欢”的例子但是我还没有在网上找到任何东西。

最佳答案

I used not().like() but I got exception "can't add: NOT without comparison".

这原来是 ORMLite 中的一个错误,已在 4.48 版中修复。它特别不处理执行类似于以下操作的查询:

where.eq(...).and().not().like(...);

如果构建查询的内联机制有任何问题,您可以随时切换到更直接的带参数的操作。请参阅 various ways to build queries 上的文档.

关于android - ormlite:sql语句不像抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19046286/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com