Document typed CRUD values in Swift SDK#412
Open
mintlify[bot] wants to merge 1 commit intomainfrom
Open
Conversation
Generated-By: mintlify-agent
simolus3
requested changes
Apr 27, 2026
| override func uploadData(database: PowerSyncDatabaseProtocol) async throws { | ||
| let batch = try await database.getCrudBatch() | ||
| guard let batch = batch else { return } | ||
| guard let batch = try await database.getCrudBatch() else { return } |
Contributor
There was a problem hiding this comment.
The changes in this snippet are nice, IMO we should revert the reference/swift.mdx changes though (we have the "Writing Client Changes" page for that).
Collaborator
There was a problem hiding this comment.
Yeah, agreed - will polish.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the typed CRUD upload APIs introduced in the Swift SDK
1.14.0release.The triggering Swift SDK PR (powersync-ja/powersync-swift#127) reimplemented CRUD transactions natively in Swift. As a result:
CrudBatch,CrudEntry, andCrudTransactionare now concretestructs instead of protocols. They cannot be constructed in user code, but reading their properties is unchanged.opDataTypedandpreviousValuesTypedonCrudEntryexpose the changed/previous column values as a typedJsonParam([String: JsonValue]), preserving SQLite types instead of stringifying everything.opDataandpreviousValuesproperties remain available for backwards compatibility and now derive from the typed versions.Changes
client-sdks/reference/swift.mdx: Added an "Uploading client changes" section coveringgetCrudBatch,getNextCrudTransaction, andgetCrudTransactions, plus a property table forCrudEntrydocumenting the new typed values and the recommended migration path.client-sdks/usage-examples.mdx: Updated the SwiftuploadDatasnippet to useopDataTypedand the simplifiedcomplete()overload.Reviewers
cc @benitav @simolus3