*** roundup-code/roundup/backends/rdbms_common.py 2013-04-29 06:59:03.000000000 -0700 --- roundup-code.works/roundup/backends/rdbms_common.py 2013-04-29 07:22:24.000000000 -0700 *************** *** 2439,2446 **** v = ['%%'+self.db.sql_stringquote(s)+'%%' for s in v] # now add to the where clause where.append('(' ! +' and '.join(["_%s._%s LIKE '%s'"%(pln, k, s) for s in v]) +')') # note: args are embedded in the query string now if 'sort' in p.need_for: --- 2439,2447 ---- v = ['%%'+self.db.sql_stringquote(s)+'%%' for s in v] # now add to the where clause + like = self.insensitive_like() where.append('(' ! +' and '.join(["_%s._%s %s '%s'"%(pln, k, like, s) for s in v]) +')') # note: args are embedded in the query string now if 'sort' in p.need_for: *************** *** 2733,2738 **** --- 2734,2747 ---- self.db.stats['filtering'] += (time.time() - start_t) return l + def insensitive_like(self): + """ + Most databases treat the LIKE operator as a case insensitive search. + For Postgresql and Oracle LIKE is case sensitive, but they have ILIKE + that is case insensitive. + """ + return 'LIKE' + def count(self): """Get the number of nodes in this class.