ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxmrlv <>
Subject [GitHub] incubator-ariatosca pull request #96: ARIA-137-Support-for-predicate-based-q...
Date Wed, 05 Apr 2017 11:27:05 GMT
Github user mxmrlv commented on a diff in the pull request:
    --- Diff: aria/storage/ ---
    @@ -243,7 +250,10 @@ def _filter_query(self, query, filters):
         def _add_value_filter(query, filters):
             for column, value in filters.items():
    -            if isinstance(value, (list, tuple)):
    +            if isinstance(value, dict):
    +                for predicate, operand in value.items():
    +                    query = query.filter(getattr(column, predicate)(operand))
    --- End diff --
    well, SQL makes it fairly simple. as in `value > other_value`. but propagating it to
the query is messy...

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message