Skip to content

Commit

Permalink
Merge pull request #29 from alexbredo/master
Browse files Browse the repository at this point in the history
added contains operator
  • Loading branch information
absent1706 authored Jan 16, 2020
2 parents 66e87b0 + 87a3a07 commit 6b02806
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlalchemy_mixins/smartquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class SmartQueryMixin(InspectionMixin, EagerLoadMixin):
'istartswith': lambda c, v: c.ilike(v + '%'),
'endswith': operators.endswith_op,
'iendswith': lambda c, v: c.ilike('%' + v),
'contains': lambda c, v: c.ilike(f'%{v}%'),

'year': lambda c, v: extract('year', c) == v,
'month': lambda c, v: extract('month', c) == v,
Expand Down

0 comments on commit 6b02806

Please sign in to comment.