-
Notifications
You must be signed in to change notification settings - Fork 113
Add Android GRDB SQLCipher support #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| } | ||
|
|
||
| package func write<T: Sendable>( | ||
| _ updates: @Sendable (Database) throws -> T | ||
| _ updates: @escaping @Sendable (Database) throws -> T | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain why this is necessary? The
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a req of the current I'm looking into why that's happening, and if it's a straightforward update. |
||
| ) async throws -> T { | ||
| try await database.write { db in | ||
| try $_isSynchronizingChanges.withValue(true) { | ||
|
|
@@ -26,7 +26,7 @@ | |
| } | ||
|
|
||
| package func read<T: Sendable>( | ||
| _ updates: @Sendable (Database) throws -> T | ||
| _ updates: @escaping @Sendable (Database) throws -> T | ||
| ) async throws -> T { | ||
| try await database.read { db in | ||
| try updates(db) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -756,15 +756,15 @@ | |
| try tearDownSyncEngine() | ||
| await withErrorReporting(.sqliteDataCloudKitFailure) { | ||
| try await userDatabase.write { db in | ||
| for table in tables { | ||
| for table in self.tables { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this because Skip/Android is using an older version of Swift that doesn't allow an implicit
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, this is fallout from making this escaping. |
||
| func open<T>(_: some SynchronizableTable<T>) { | ||
| withErrorReporting(.sqliteDataCloudKitFailure) { | ||
| try T.delete().execute(db) | ||
| } | ||
| } | ||
| open(table) | ||
| } | ||
| try setUpSyncEngine(writableDB: db) | ||
| try self.setUpSyncEngine(writableDB: db) | ||
| } | ||
| } | ||
| try await start() | ||
|
|
@@ -1591,7 +1591,7 @@ | |
| if let share = record as? CKShare { | ||
| shares.append(.share(share)) | ||
| } else { | ||
| upsertFromServerRecord(record, db: db) | ||
| self.upsertFromServerRecord(record, db: db) | ||
| if let shareReference = record.share { | ||
| shares.append(.reference(shareReference)) | ||
| } | ||
|
|
@@ -1893,7 +1893,7 @@ | |
| ) async { | ||
| await withErrorReporting(.sqliteDataCloudKitFailure) { | ||
| try await userDatabase.write { db in | ||
| upsertFromServerRecord(serverRecord, force: force, db: db) | ||
| self.upsertFromServerRecord(serverRecord, force: force, db: db) | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.