From 1a44af5f314f4763625b1ce7f453901375dfac5b Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 2 Jul 2025 05:50:28 -0300 Subject: [PATCH 1/2] chore: ignore .cursor/ directory --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d858f416..d2c95c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,5 @@ iOSInjectionProject/ Secrets.swift lcov.info temp_coverage + +.cursor/ From f03a878a2f9dd575fb9892af75b4a09ff13e6648 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Wed, 2 Jul 2025 05:50:35 -0300 Subject: [PATCH 2/2] fix(postgrest): ensure Sendable conformance for execute method --- Sources/PostgREST/PostgrestBuilder.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/PostgREST/PostgrestBuilder.swift b/Sources/PostgREST/PostgrestBuilder.swift index 2f91af44..db2116a0 100644 --- a/Sources/PostgREST/PostgrestBuilder.swift +++ b/Sources/PostgREST/PostgrestBuilder.swift @@ -80,7 +80,7 @@ public class PostgrestBuilder: @unchecked Sendable { /// - options: Options for querying Supabase. /// - Returns: A `PostgrestResponse` instance representing the response. @discardableResult - public func execute( + public func execute( options: FetchOptions = FetchOptions() ) async throws -> PostgrestResponse { try await execute(options: options) { [configuration] data in @@ -93,7 +93,7 @@ public class PostgrestBuilder: @unchecked Sendable { } } - private func execute( + private func execute( options: FetchOptions, decode: (Data) throws -> T ) async throws -> PostgrestResponse { @@ -126,7 +126,7 @@ public class PostgrestBuilder: @unchecked Sendable { let response = try await http.send(request) - guard 200 ..< 300 ~= response.statusCode else { + guard 200..<300 ~= response.statusCode else { if let error = try? configuration.decoder.decode(PostgrestError.self, from: response.data) { throw error } @@ -135,7 +135,11 @@ public class PostgrestBuilder: @unchecked Sendable { } let value = try decode(response.data) - return PostgrestResponse(data: response.data, response: response.underlyingResponse, value: value) + return PostgrestResponse( + data: response.data, + response: response.underlyingResponse, + value: value + ) } }