我有两张桌子:
id
列Transaction
,id
,description
和value
card_id
列Card
和id
。
如何使用ormlite编写以下查询?
name
我可以写
SELECT * FROM Transaction
LEFT JOIN Card ON transaction.card_id = card.id
WHERE transaction.value > 0 AND (transaction.description LIKE '%query%' OR card.name LIKE '%query%')
但是如何使用正确的AND,OR和括号使用QueryBuilder<Transaction, Long> tranBuilder = transactionDao.queryBuilder();
QueryBuilder<Card, Long> cardBuilder = cardDao.queryBuilder();
tranBuilder.leftJoin(cardBuilder);
方法编写WHERE条件?