supabase-community / postgrest-go

Isomorphic Go client for PostgREST. (Now Updating)
https://supabase.io
Apache License 2.0
170 stars 27 forks source link

Revert "fix: parsing of In filters" #15

Closed yusufpapurcu closed 3 years ago

yusufpapurcu commented 3 years ago

Reverts supabase/postgrest-go#13 Could you explain problem with issue and wait us for review? Also why you added panic into function?

darora commented 3 years ago

Hey @yusufpapurcu - the old implementation is completely broken:

inian commented 3 years ago

Side note - should we add . and ; to the regex? ref

yusufpapurcu commented 3 years ago
  • regexp call is passed the arguments in the wrong order. This isn't being detected at the moment because the error returned is just being thrown away; I'm no longer ignoring it which is why there's a panic (shouldn't be triggered unless someone changes the pattern)

That's a huge mistake I'm sorry for this. You're right we need change this. I will test new form of In filter and reverse commits if it works. Also we can use regexp.MustCompile. This function panics if pattern wrong.

yusufpapurcu commented 3 years ago

Ok I reversed my revert commit. Thanks for help 💯