make search case-insensitive
This commit is contained in:
parent
d6158fc44a
commit
49bedb7e66
1 changed files with 4 additions and 10 deletions
|
|
@ -5486,20 +5486,14 @@ class RootExports(object):
|
|||
raise koji.GenericError, 'unknown search type: %s' % type
|
||||
|
||||
if matchType == 'glob':
|
||||
if '?' in terms or '*' in terms:
|
||||
oper = 'like'
|
||||
terms = self._prepareSearchTerms(terms, matchType)
|
||||
else:
|
||||
# if we're not actually globbing anything, use = so it can use the index;
|
||||
# also, don't pass terms through _prepareSearchTerms(), because we don't need
|
||||
# to escape slashes or underscores
|
||||
oper = '='
|
||||
oper = 'ilike'
|
||||
elif matchType == 'regexp':
|
||||
oper = '~'
|
||||
terms = self._prepareSearchTerms(terms, matchType)
|
||||
oper = '~*'
|
||||
else:
|
||||
raise koji.GenericError, 'unknown match type: %s' % matchType
|
||||
|
||||
terms = self._prepareSearchTerms(terms, matchType)
|
||||
|
||||
cols = ('id', 'name')
|
||||
aliases = cols
|
||||
joins = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue