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?

Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande