Skip to content

fix(inFilter): Enable inFilter usage with strings - #24

Merged
spydon merged 2 commits into
supabase-community:mainfrom
thaddeusdiamond:main
Sep 9, 2026
Merged

spydon merged 2 commits into
supabase-community:mainfrom
thaddeusdiamond:main

Conversation

@thaddeusdiamond

Copy link
Copy Markdown
Contributor

Commit Message

commit 8a4418443ca4da09781dc8c91117cc0f19e1c298 (HEAD -> main, origin/main, origin/HEAD)
Author: Thaddeus Diamond
Date:   Sun May 18 00:34:10 2025 -0500

[Purpose]
Enable inFilter in test environments when the filter is a string.

[Technical]
- Strip quotations passed from client side HTTP call (e.g., PostgREST)
- Add unit testing to validate

[ Testing: flutter test ]

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Unit tests for string filters in Flutter code like this fail:

final response = await _client
        .from('my_table')
        .select()
        .inFilter('filter_col', ['filter val 1', 'filter val 2']);

What is the new behavior?

Strip (left and right) double quotations passed across HTTP wire.

Additional context

See unit tests

thaddeusdiamond and others added 2 commits May 18, 2025 00:34
[Purpose]
Enable inFilter in test environments when the filter is a string.

[Technical]
- Strip quotations passed from client side HTTP call (e.g., PostgREST)
- Add unit testing to validate

[ Testing: flutter test ]
Parse the Postgrest list with a quote-aware scan instead of splitting on
every comma and stripping the outer quotes, so values that contain a
comma or a double quote match as well.

Splits out the string cases into their own tests and fixes the
formatting so `dart format -l 80 --set-exit-if-changed` passes.

@spydon spydon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, sorry for the long wait!
Once v3 is released the official supabase_test package will replace this one.

@spydon
spydon merged commit bde98de into supabase-community:main Sep 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants