bindings/dotnet: support batches on embedded replicas - #8609
Open
awakecoding wants to merge 1 commit into
Open
Conversation
Execute replica batch commands in order through the existing local connection and expose their buffered results through DbDataReader. Keep replica batches non-atomic unless callers attach an explicit transaction, and keep active batch readers inside the sync-operation lifetime gate. Reset expired remote batch sessions without replaying a possibly partially applied batch. Invalidate an expired transaction stream rather than allowing later statements to escape its transaction. Tests: dotnet build Turso.Data.csproj (net8.0, net9.0, net10.0); dotnet test Turso.Tests.csproj (207 passed, 1 skipped)
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
DbBatchon opened embedded replica connections while leaving plain local connections unsupportedTursoCommandpath, including parameters, timeouts, cancellation, transactions, affected-row counts, scalar results, and orderedNextResultreadersSemantics
Replica batches are sequential, not implicitly atomic. Callers must attach an explicit
TursoTransactionwhen all commands need to commit or roll back together. The README now shows that pattern.Extraction
This is the next focused extraction from the closed source draft #8504 (
awakecoding:copilot/complete-dotnet-bindings, source commitf3b327655768d14a8da94c54db9fd3d98c4a7d3d) after merged PRs #8514, #8519, #8523, #8530, #8555, and #8557.Deferred layers remain out of this PR: broad Hrana single-command retry and transaction recovery, ADO.NET schema/GUID/enum/isolation compatibility, the
Turso.Data.Sqlitemanaged remote/replica backend, EF Core integration, NativeAOT/mobile/package-consumer work and CI, and Rust changes.Validation
dotnet format bindings/dotnet/Turso.slnx --no-restore --include <changed C# files>dotnet build bindings/dotnet/src/Turso.Data/Turso.Data.csproj --no-restore --configuration Debug(net8.0, net9.0, net10.0)Turso.Tests: 207 passed, 1 skipped