Skip to content

chore: merge assignmentsToModelCreate + validate into single pass with bitmap, replace ToRowMap with ToColsVals#48

Merged
VoidClancy merged 1 commit into
masterfrom
benchmark
Jul 18, 2026
Merged

chore: merge assignmentsToModelCreate + validate into single pass with bitmap, replace ToRowMap with ToColsVals#48
VoidClancy merged 1 commit into
masterfrom
benchmark

Conversation

@VoidClancy

Copy link
Copy Markdown
Owner

1- Merge validateModelCreate + assignmentsToModelCreate into one assignmentsToModelCreate function that validates and builds the struct in a single pass, using a uint64 bitmap (no map allocation) to track which fields were provided

2- Replace ToRowMap() with ToColsVals(), returns (cols []string, vals []any) directly, eliminating the intermediate map allocation and the mapToColsVals() filtering step

3- Update executeModelCreate call site to use args.ToColsVals() directly

4- Keep ToRowMap() as a thin compatibility layer that wraps ToColsVals() for the bulk create paths (executeModelCreateMany/AndReturn) which still expect map[string]any, to be removed when those are refactored

…h bitmap, replace ToRowMap with ToColsVals

1- Merge validateModelCreate + assignmentsToModelCreate into one assignmentsToModelCreate function that validates and builds the struct in a single pass, using a uint64 bitmap (no map allocation) to track which fields were provided

2- Replace ToRowMap() with ToColsVals(), returns (cols []string, vals []any) directly, eliminating the intermediate map allocation and the mapToColsVals() filtering step

3- Update executeModelCreate call site to use args.ToColsVals() directly

4- Keep ToRowMap() as a thin compatibility layer that wraps ToColsVals() for the bulk create paths (executeModelCreateMany/AndReturn) which still expect map[string]any, to be removed when those are refactored
@VoidClancy VoidClancy self-assigned this Jul 18, 2026
@VoidClancy
VoidClancy merged commit 5cd6c6d into master Jul 18, 2026
5 checks passed
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