supabase / postgrest-dart

Dart client for PostgREST
https://supabase.com
MIT License
136 stars 38 forks source link

Fix/allow multiple filters on same column #50

Closed Vinzent03 closed 2 years ago

Vinzent03 commented 2 years ago

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Column filters are sent as query parameters key. When adding a new filter, the current key gets overwritten. So you cannot apply multiple filters to the same column

What is the new behavior?

The Uri class accepts a list as query parameter value to support multiple values for one key.

Additional context

It's funny that @phamhieu added a new test today to check for date between two other dates, but I'm pretty sure if he had added another row with a date before the lower end, the test wouldn't pass. That's why I added a new row.

Vinzent03 commented 2 years ago

If your Programm doesn't work, you start digging deeper. :joy:

phamhieu commented 2 years ago

Thanks @Vinzent03 👍👍👍