android - Query using LIKE isn't working using GreenDAO -
i have table column string 3 characters, each character has value 0 or 1. i'd select rows according case.
i'd perform query that:
select * item group_type ?
? can 100 or 101 or 011 or 111 or 001. combination 0 , 1 in 3 characters.
i'm trying query using like
wherecondition = null; switch (condition) { case case1: = itemdao.properties.grouptype.like("1%"); break; case case2: = itemdao.properties.grouptype.like("%1%"); break; case case3: = itemdao.properties.grouptype.like("%1"); break; } list<item> items = itemdao.querybuilder().where(where).list();
case1 returning starts 1 expected. case3 returning ends 1 expected. case2 returning everything! doesn't metter value in beggining, middle or end. it's returning everything.
case1 , case3 working fine. however, case2 isn't working. there problem that?
Comments
Post a Comment