Skip to content

Rework batch execution and error handling - #37

Open
RozmiDan wants to merge 11 commits into
mainfrom
fix_batch_protocol
Open

RozmiDan wants to merge 11 commits into
mainfrom
fix_batch_protocol

Conversation

@RozmiDan

Copy link
Copy Markdown
Contributor

Rework batch execution to fix resource cleanup, transaction ownership, and error handling. Add a simple batch API for native fbx and database/sql.

  • Keep one prepared statement and use its metadata throughout the batch lifetime.
  • Reuse PreparedBatch between executions and clear queued data without closing the server batch.
  • Fix protocol response handling, context cancellation, and retry safety.
  • Add Exec(sql, BatchRows) to send and execute a complete set of parameters in one call.
  • Fix BatchInsert cleanup and source error handling.
  • Validate batch options and return -1 when affected row counts are unknown.
  • Add PreparedBatch.Info to read server batch buffer information.
  • Read batch completion entries incrementally instead of allocating arrays from header counts.

@RozmiDan RozmiDan added this to the v0.8.0 milestone Nov 13, 2026
@RozmiDan
RozmiDan requested a review from MrTeeett November 13, 2026 10:21
@RozmiDan RozmiDan self-assigned this Nov 13, 2026
@RozmiDan RozmiDan added the enhancement New feature or request label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants