我在sqlite:中有一个查询
select * from table where upper(name) = "ABC";
绿道中是否有执行相同查询的函数?
您可以使用LIKE。例如:
SELECT * FROM prices WHERE flow LIKE "Tiroirs"
SELECT * FROM prices WHERE flow LIKE "TirOirS"
SELECT * FROM prices WHERE flow LIKE "tiroirS"
上面的三个例子在sqlite中有相同的结果(mysql也是,我不知道是否所有DB都有相同的行为)。然后你可以使用GreenDao的等价物:
priceDao.queryBuilder().where(PricesDBDao.Properties.Flow.like(flow))
像这样尝试RAW查询
Query query = userDao.queryBuilder().where(
new StringCondition("(select * from table where upper(name) = "ABC")").build();