0

I have a table i Supabase which looks like this: enter image description here

I want to use supabase-js client library to filter on phone_numbers (which is a text array).
If I do like this:

const { data, error } = await supabaseClient.from('profiles').select('*').contains('phone_numbers', ["123456"])

I get no result back.

If I do this in raw SQL it works (I get the row with id 2 back):

select * from profiles where phone_numbers @> array['123456'];

What am I doing wrong in the javascript filter?

1 Answer 1

0

Never mind, it was a RLS policy issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.