Combining AND / OR filters with SELECT function in @aws-appsync/utils/rds (createPgStatement)

0

I'm trying to use the new Aurora resolver tools in Appsync, but it seems that the select utility function is incomplete.

It appears that there is not a supported operator for IN LIST, so my backup attempt was to use several "eq" filters in an "or" list. The problem is that when combining "or" filters with other unrelated filters, the helper function does not separate the "or" items with parenthesis.

For example:

"filter": {
        "vendor": {"eq": "No Vendor"},
        "or": [{"txnNumber": {"eq": 162228}},
                 {"txnNumber": {"eq": 162460}}]
          },

Creates the following query:

WHERE \"vendor\" = :P0 AND (\"txnNumber\" = :P1) OR (\"txnNumber\" = :P2) LIMIT :P3 OFFSET :P4"

I know I can create my SQL statement in a more manual fashion, but I'd rather not recreate logic for the simpler filter values. Is there a hybrid approach that would allow me to use the helper function for the simpler FilterTypes, but allow me to implement an IN LIST type?

Is there a road map for adding IN LIST and improving the "OR" behavior?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠