Closed
Description
Bug report
Describe the bug
When using the Storage schema and accessing the objects table (I just need the name), it always returns an empty array.
To Reproduce
Create a client with the 'storage' schema set :
let storageClient = SupabaseClient(supabaseURL: URL(string: "...")!, supabaseKey: "...", options: SupabaseClientOptions(db: SupabaseClientOptions.DatabaseOptions(schema: "storage")))
Try and query some data:
struct Storage: Encodable, Decodable {
// var id: UUID?
// var bucketID: String?
var name: String?
// var owner: UUID?
// var createdAt: Date?
// var updatedAt: Date?
// var lastAccessedAt: Date?
// var metadata: [String: String]? // Assuming a dictionary to represent JSONB data
// var pathTokens: [String]? // Assuming an array of strings for path tokens
// var version: String?
// var ownerID: String?
}
let storageFile: [Storage] = try await storageClient.database
.from("objects")
.execute().value
print(storageFile)
Expected behavior
Should return the whole objects table.
Additional context
Personally just need the "name" column data. I think using the objects table is better than saving the path to files inside supabase storage myself (duplicate data)?