GenericPowerSyncService
Initialization
Section titled “Initialization”GenericPowerSyncService( tableName: String, userId: String)Properties
Section titled “Properties”@Published var records: [[String: Any]] // Loaded recordsRead Operations
Section titled “Read Operations”func loadRecords( fields: [String] = ["*"], whereClause: String? = nil, parameters: [Any] = [], orderBy: String = "created_at DESC", encryptedFields: [String] = [], integerFields: [String] = [], booleanFields: [String] = []) async throwsCreate Operations
Section titled “Create Operations”func createRecord( fields: [String: Any], encryptedFields: [String] = [], autoGenerateId: Bool = true, autoTimestamp: Bool = true) async throws -> String
func createRecords( records: [[String: Any]], encryptedFields: [String] = [], autoGenerateId: Bool = true, autoTimestamp: Bool = true) async throws -> [String]Update Operations
Section titled “Update Operations”func updateRecord( id: String, fields: [String: Any], encryptedFields: [String] = [], autoTimestamp: Bool = true) async throwsDelete Operations
Section titled “Delete Operations”func deleteRecord(id: String, caseInsensitive: Bool = true) async throwsfunc deleteRecords(ids: [String], caseInsensitive: Bool = true) async throws