refactor: implement streaming results with ResultHandler interface

Replace array-based result buffering with streaming callback architecture to enable constant memory usage for large result sets.

Key changes:

  • Add results package with ResultHandler interface for stage-aware callbacks
  • Update Plan.Execute() signature to stream via handler instead of returning results
  • Implement streaming in SelectPlan, SequencePlan, and CreatePlan
  • Add BufferingHandler for testing with single-stage row assertion
  • Remove deprecated Results struct and backward compatibility type aliases
  • Update all tests to use results.BufferingHandler
  • Add static error variables (ErrNoStage, ErrMultipleResultStages)
  • Fix linter issues (err113, paralleltest, noinlineerr, wrapcheck)

All types now reference results package directly (results.ColumnDef, results.Row, results.ExecutionStats, etc.) with no indirection.

Merge request reports

Loading