Skip to content

Conversation

stevensJourney
Copy link
Contributor

Overview

The current CrudBatch protocol does not provide a default value for the complete method's optional writeCheckpoint parameter. This PR adds a Protocol extension which provides the default value.

@stevensJourney stevensJourney requested a review from Copilot May 13, 2025 07:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a default value for the optional writeCheckpoint parameter in the CrudBatch.complete method.

  • Adds a protocol extension to allow calling complete() without explicitly supplying a nil parameter.
  • Updates tests to verify that calling complete() succeeds without a writeCheckpoint argument.
  • Updates the CHANGELOG to document the change.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Tests/PowerSyncTests/CrudTests.swift Adds a test case to ensure complete() can be called without specifying nil.
Sources/PowerSync/Protocol/db/CrudBatch.swift Provides a protocol extension with a default nil parameter for complete().
CHANGELOG.md Documents the default nil parameter change for complete().

@stevensJourney stevensJourney marked this pull request as ready for review May 13, 2025 08:12
@stevensJourney stevensJourney requested a review from simolus3 May 13, 2025 08:12
Copy link
Contributor

@simolus3 simolus3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with these changes 👍

@stevensJourney stevensJourney merged commit eec1bbf into main May 13, 2025
3 checks passed
@stevensJourney stevensJourney deleted the complete-crud-batch branch May 13, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants