feat: export PoolBatchResults, ErrBatchResults, ErrRows and ErrRow#2491
feat: export PoolBatchResults, ErrBatchResults, ErrRows and ErrRow#2491grachevko wants to merge 1 commit intojackc:masterfrom
Conversation
|
I'd prefer to keep these types as internal implementation details if possible. We don't currently expose the concrete types for non-error responses either. Does this unblock functionality you need or is the goal to reduce some duplicated code? |
This PR not expose any types, only constructors, which returns already exposed interfaces. Types keep internal.
Only reduce duplicates |
Ah. I see now.
In general, I prefer to avoid increasing the API surface area unless the functionality cannot be built outside of pgx or the need is extremely common. In this case, since the functionality can be built outside and it is not an extremely common request, I'd rather not merge this. |
Exports previously internal error wrapper types (ErrBatchResults, ErrRows, ErrRow) and adds PoolBatchResults constructor.
We implement custom connection pool logic combined with sqlc and currently we have to duplicate internal pgx error wrapper implementations.
Is this type of change acceptable?