Skip to content

feat(sqlite): expose transaction state - #1524

Open
wozhenbang2004 wants to merge 26 commits into
xerial:masterfrom
wozhenbang2004:transaction-state-849
Open

wozhenbang2004 wants to merge 26 commits into
xerial:masterfrom
wozhenbang2004:transaction-state-849

Conversation

@wozhenbang2004

Copy link
Copy Markdown

Closes #849.

Adds DB.transactionState(String), backed by sqlite3_txn_state(), and the SQLITE_TXN_* constants. Callers can inspect one schema or pass null for the highest state across all schemas when diagnosing read-to-write transaction upgrades. Invalid schema names return -1, matching SQLite.

The tests cover read/write transitions and rollback, attached schemas, closed connections, and two connections contending for a write lock. mvn verify animal-sniffer:check passes against the Linux x86_64 library produced by the project's Build Native workflow.

The Build Native workflow produced all 24 platform libraries. CI on the final commit passes, including the GraalVM and multi-architecture matrices, formatting, and Android signature checks.

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.

Retrieve transaction state from sqlite3_txn_state

1 participant