supabase: .contains() not working in Flutter

Bug report

Describe the bug

I’m trying to get data that contains some text. Specifically from an array column, but it doesn’t work in a standard text column either.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

.contains doesn’t work:

              final res = await supabase
                  .from('places')
                  .select('name')
                  .contains('name', 'Park')
                  .execute();

              final data = res.data;
              print(data); // returns null
              print(data.toString()); // returns null

.eq works:

              final res = await supabase
                  .from('places')
                  .select('name')
                  .eq('name', 'Beach Park')
                  .execute();

              final data = res.data;
              print(data.toString()); // returns Beach Park

Expected behavior

Return data that contains “park”

Screenshots

System information

  • OS: iOs -supabase_flutter: ^0.3.1
  • Flutter 3

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

@jtkeyva Thanks for pointing this out! Will edit the docs later to clarify some of the confusion here!

@maheshmnj Would you be able to post this question on discussion? If you could also add the SQL format of what you want to achieve, that would be helpful.