Skip to content

Split ResultSetInterface into capability interfaces - #162

Draft
tyrsson wants to merge 1 commit into
0.6.xfrom
resultset-interface-segregation
Draft

Split ResultSetInterface into capability interfaces#162
tyrsson wants to merge 1 commit into
0.6.xfrom
resultset-interface-segregation

Conversation

@tyrsson

@tyrsson tyrsson commented Aug 7, 2026

Copy link
Copy Markdown
Member
  • Trim ResultSetInterface down to Iterator/Countable/initialize/getFieldCount/toArray
  • Add standalone ArrayObjectResultSetInterface and HydratingResultSetInterface
    capability interfaces (combined via implements + intersection types, not
    inheritance), so setRowPrototype()/getRowPrototype() no longer force a wide
    ArrayObject|RowPrototypeInterface union onto every implementation
  • ResultSet narrows to ArrayObject-only; HydratingResultSet keeps its
    intentionally wide object typing, now isolated to its own interface
  • Move toArray() out of AbstractResultSet; each concrete class implements only
    the row-casting logic it actually needs

Stack created with GitHub Stacks CLIGive Feedback 💬

- Trim ResultSetInterface down to Iterator/Countable/initialize/getFieldCount/toArray
- Add standalone ArrayObjectResultSetInterface and HydratingResultSetInterface
  capability interfaces (combined via implements + intersection types, not
  inheritance), so setRowPrototype()/getRowPrototype() no longer force a wide
  ArrayObject|RowPrototypeInterface union onto every implementation
- ResultSet narrows to ArrayObject-only; HydratingResultSet keeps its
  intentionally wide object typing, now isolated to its own interface
- Move toArray() out of AbstractResultSet; each concrete class implements only
  the row-casting logic it actually needs
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.

1 participant