ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIA-137) Support for predicate based queries in the SQL mapi
Date Wed, 05 Apr 2017 11:27:41 GMT

    [ https://issues.apache.org/jira/browse/ARIA-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956694#comment-15956694
] 

ASF GitHub Bot commented on ARIA-137:
-------------------------------------

Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/96#discussion_r109890955
  
    --- Diff: aria/storage/sql_mapi.py ---
    @@ -243,7 +250,10 @@ def _filter_query(self, query, filters):
         @staticmethod
         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...


> Support for predicate based queries in the SQL mapi
> ---------------------------------------------------
>
>                 Key: ARIA-137
>                 URL: https://issues.apache.org/jira/browse/ARIA-137
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Maxim Orlov
>            Assignee: Maxim Orlov
>
> Currently the SQL mapi syntax doesn't provide with a way of predicate based queries.
we need to add support for gt, lt etc... (and a combinations of them).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message