Skip to content

Can't use filters after RPC call #110

Closed
supabase-community/postgrest-swift
#50
@brendanjhoffman

Description

@brendanjhoffman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpostgrestWork related to postgrest package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions