Skip to content

Conversation

@sttk
Copy link
Owner

@sttk sttk commented Aug 18, 2025

This PR modified APIs align with Rust implementation.

  1. Move DataHub#run to Sabi.run
  2. Move DataHub#txn to Sabi.txn.
  3. Move Data.FailToCastDataHub to Sabi.FailToCastDataHub.
  4. merge DataHub#postCommit into DataHub#commit.

@sttk sttk requested a review from Copilot August 18, 2025 04:57

This comment was marked as outdated.

@sttk sttk requested a review from Copilot August 18, 2025 05:03
Copy link

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 refactors the Sabi framework's API to align with the Rust implementation by moving core execution and transaction methods from DataHub to the Sabi class, while merging postCommit functionality into the commit method.

Key changes:

  • Moved DataHub#run and DataHub#txn methods to Sabi.run and Sabi.txn as static methods
  • Moved DataHub.FailToCastDataHub error record to Sabi.FailToCastDataHub
  • Integrated postCommit functionality directly into the commit method flow

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/com/github/sttk/sabi/Sabi.java Added static run and txn methods and FailToCastDataHub record
src/main/java/com/github/sttk/sabi/DataHub.java Removed run, txn methods and FailToCastDataHub record; added package-private lifecycle methods
src/main/java/com/github/sttk/sabi/internal/DataHubInner.java Merged postCommit functionality into commit method
src/test/java/com/github/sttk/sabi/internal/DataHubInnerTest.java Updated test expectations to reflect merged commit/postCommit behavior
src/test/java/com/github/sttk/sabi/internal/DataAccTest.java Updated test calls to use new static Sabi.run and Sabi.txn methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sttk sttk merged commit ed36ebd into main Aug 18, 2025
12 checks passed
@sttk sttk deleted the modified_run_and_txn_align_with_rust_impl branch August 18, 2025 05:06
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