Skip to content

Commit

Permalink
fix: rpc call returns PostgrestFilterBuilder (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwjoshuak committed Nov 5, 2023
1 parent e9dae74 commit 68742e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/PostgREST/PostgrestClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class PostgrestClient {
fn: String,
params: U,
count: CountOption? = nil
) -> PostgrestTransformBuilder {
) -> PostgrestFilterBuilder {
PostgrestRpcBuilder(
client: self,
request: Request(
Expand All @@ -76,7 +76,7 @@ public class PostgrestClient {
public func rpc(
fn: String,
count: CountOption? = nil
) -> PostgrestTransformBuilder {
) -> PostgrestFilterBuilder {
rpc(fn: fn, params: NoParams(), count: count)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/PostgREST/PostgrestRpcBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public final class PostgrestRpcBuilder: PostgrestBuilder {
params: U,
head: Bool = false,
count: CountOption? = nil
) -> PostgrestTransformBuilder {
) -> PostgrestFilterBuilder {
// TODO: Support `HEAD` method
// https://github.com/supabase/postgrest-js/blob/master/src/lib/PostgrestRpcBuilder.ts#L38
assert(head == false, "HEAD is not currently supported yet.")
Expand All @@ -27,6 +27,6 @@ public final class PostgrestRpcBuilder: PostgrestBuilder {
}
}

return PostgrestTransformBuilder(self)
return PostgrestFilterBuilder(self)
}
}

0 comments on commit 68742e9

Please sign in to comment.