Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent results when using eq #37

Closed
koaning opened this issue Jul 27, 2021 · 2 comments · Fixed by supabase-community/postgrest-py#24
Closed

Inconsistent results when using eq #37

koaning opened this issue Jul 27, 2021 · 2 comments · Fixed by supabase-community/postgrest-py#24
Labels
bug Something isn't working

Comments

@koaning
Copy link

koaning commented Jul 27, 2021

Bug report

Describe the bug

I have a query that runs just as expected.

> supabase.table("storage").select('*').ilike('message', 'dude').execute()
{'data': [{'id': 2,
   'inserted_at': '2021-07-27T18:34:27.084558+00:00',
   'updated_at': '2021-07-27T18:34:27.084558+00:00',
   'email': '[email protected]',
   'message': 'dude'},
  {'id': 3,
   'inserted_at': '2021-07-27T18:34:31.482083+00:00',
   'updated_at': '2021-07-27T18:34:31.482083+00:00',
   'email': '[email protected]',
   'message': 'dude'}],
 'status_code': 200}

But notice what happens when I run:

> supabase.table("storage").select('*').like('email', '[email protected]').execute()
{'data': [], 'status_code': 200}

Somehow I cannot query the email like I can the other columns in my table. Is email a protected value?

I am using supabase-py version 0.0.2.

@koaning koaning added the bug Something isn't working label Jul 27, 2021
@willtraweek
Copy link

willtraweek commented Aug 9, 2021

I've been running into the same issue. When I started playing around with it, it looks like its a problem with the way the URLs are encoded.

For example, when I set an email to test and execute the query with that value, then the row shows up just fine. Same with test@test, but [email protected] shows no results.

@willtraweek
Copy link

I'm beginning to think this is because they use a . to differentiate between the command and the query itself. See the URL that .eq("email", "[email protected]") produces:
Screen Shot 2021-08-09 at 12 40 36 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants