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

Can't use filters after RPC call #110

Closed
brendanjhoffman opened this issue Oct 2, 2023 · 0 comments · Fixed by supabase-community/postgrest-swift#50
Closed

Can't use filters after RPC call #110

brendanjhoffman opened this issue Oct 2, 2023 · 0 comments · Fixed by supabase-community/postgrest-swift#50
Labels
bug Something isn't working postgrest Work related to postgrest package

Comments

@brendanjhoffman
Copy link

brendanjhoffman commented Oct 2, 2023

Bug report

Describe the bug

A database function that returns a table called using try await client.database.rpc() returns a PostgresTransformBuilder type, which doesn't have modifiers like eq() available.

To Reproduce

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

  1. Create a database function that returns a table
  2. Call that database function with try await client.database.rpc()
  3. Add .eq() or another modifier to the same query.
  4. See error

Expected behavior

I should be able to add modifiers to a database function that returns a table; the JavaScript equivalent code works as expected.

Screenshots

Docs note that filters can be added after rpc()
https://supabase.com/docs/reference/swift/using-filters
image

image

System information

  • OS: macOS
  • supabase-swift 0.3.0

Additional context

This is where .rpc() in postgrest-swift returns a PostgrestTransformBuilder.

This is where .rpc() in postgrest-js returns a PostgrestFilterBuilder.

@brendanjhoffman brendanjhoffman added the bug Something isn't working label Oct 2, 2023
cwjoshuak added a commit to cwjoshuak/postgrest-swift that referenced this issue Oct 9, 2023
@grdsdev grdsdev added the postgrest Work related to postgrest package label Oct 17, 2023
grdsdev pushed a commit to supabase-community/postgrest-swift that referenced this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgrest Work related to postgrest package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants