//http://stackoverflow.com/questions/7642161/android-ormlite-like-function-is-not-working

try {
    QueryBuilder<MakeDTO, Integer> qb = makeDao.queryBuilder();
    qb.where().like("madeCompany", "%"+filterKey+"%");
    PreparedQuery<MakeDTO> pq = qb.prepare();
    return makeDao.query(pq);
} catch (SQLException e) {
    throw new AppException(e);
}

http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/Where.html

 

 

 Where<T,ID> like(String columnName, Object value) 
          Add a LIKE clause so the column must mach the value using '%' patterns.

 

 Where<T,ID> like(String columnName, Object value) 
          Add a LIKE clause so the column must mach the value using '%' patterns.

相关文章:

  • 2022-12-23
  • 2021-08-25
  • 2021-08-10
  • 2021-11-07
  • 2021-11-13
  • 2022-01-06
  • 2021-11-13
  • 2021-10-07
猜你喜欢
  • 2021-10-22
  • 2021-11-03
  • 2021-10-19
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案