You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fuzzy query in the pip documentation is not working. Changing a little bit to the Manager class (change "==" in the query function to "ilike") solves this problem.
class BetterManager(Manager):
def __init__(self, dbfile, logger=None):
super().__init__(dbfile, logger)
def fuzzy_query(self, Meta, key=None, value=None):
query = self.session.query(Meta)
if key:
if key not in Meta.__dict__:
self.logger.warning(f'unavailable key: {key}')
return None
else:
query = query.filter(Meta.__dict__[key].ilike(value))
return query
The text was updated successfully, but these errors were encountered:
The fuzzy query in the pip documentation is not working. Changing a little bit to the Manager class (change "==" in the query function to "ilike") solves this problem.
The text was updated successfully, but these errors were encountered: