Skip to content

Improve type mapping collection code#5920

Merged
NinoFloris merged 4 commits intomainfrom
improve-type-mapping-collection
Nov 16, 2024
Merged

Improve type mapping collection code#5920
NinoFloris merged 4 commits intomainfrom
improve-type-mapping-collection

Conversation

@NinoFloris
Copy link
Member

@NinoFloris NinoFloris commented Nov 10, 2024

Add overloads for the most commonly used CreateInfo calls. It should also help binary size due to removing optional args being passed from the many call sites (EDIT: tiny reduction of %o1). Introduces a tiny breaking change in an area no public plugins use (resolvertypeinfo) by requiring includeDataTypeName to be passed.

This particular change helps to prepare for #5472 (which was very messy due to the current optional params). I might end up making some options type or configure lambda to do the PgTypeInfo configuration, instead of adding more overloads with more optional params.

This PR also contains some clarification comments and a refactor of TypeInfoFactory resolvedDataTypeName => requiresDataTypeName.

@NinoFloris NinoFloris added this to the 9.0.0 milestone Nov 10, 2024
@NinoFloris NinoFloris force-pushed the improve-type-mapping-collection branch from a392326 to ddf3035 Compare November 10, 2024 13:16
Copy link
Contributor

@vonzshik vonzshik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good enough, just a few comments

Also make includeDataTypeName required, important to consciously consider passing the right value for correctness.
Also add some commentary on its use
@NinoFloris NinoFloris force-pushed the improve-type-mapping-collection branch from ddf3035 to 1a7485e Compare November 16, 2024 12:56
@NinoFloris NinoFloris enabled auto-merge (squash) November 16, 2024 12:57
@NinoFloris NinoFloris merged commit eeaef3f into main Nov 16, 2024
@NinoFloris NinoFloris deleted the improve-type-mapping-collection branch November 16, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants