Skip to content

Conversation

@devedse
Copy link

@devedse devedse commented Dec 13, 2025

Hi all,

Just like this issue I also needed support for SplitOn:
#163

I played quite a bit with AI for this PR but it seems to work for me at least. So please do a thorough review before merging this in.

Devedse

Copilot AI and others added 18 commits December 10, 2025 00:35
Co-authored-by: devedse <2350015+devedse@users.noreply.github.com>
…ation

Co-authored-by: devedse <2350015+devedse@users.noreply.github.com>
…n framework

Co-authored-by: devedse <2350015+devedse@users.noreply.github.com>
…and initialize remaining tokens

- Updated the Tokenize method across multiple interceptors to calculate the number of available columns based on the reader's FieldCount and the columnOffset.
- Introduced a tokenCount variable to limit the loop iteration to the lesser of the tokens length and available columns.
- Added logic to initialize any remaining tokens to -1 (unmapped) after processing available columns, ensuring that all tokens are accounted for.
- Added handling for unmapped columns in various interceptors by introducing a case for -1, which skips unmapped columns during data reading.
- Updated Tokenize methods to initialize remaining tokens to -1 for unmapped columns.
- Adjusted output files for QueryCustomConstructionWithFactoryMethod, QueryDetection, QueryMultiType, RequiredProperties, RowCountHint, Single, Techempower, TopLevelStatements, and TsqlTips to reflect these changes.
- Bumped version to 1.0.59 in version.json.
…d column skips

- Updated interceptor methods across multiple files to replace foreach loops with for loops for better performance and clarity.
- Changed return statements from null to tokenCount in Read methods to ensure proper handling of token counts.
- Removed unnecessary comments regarding unmapped columns, streamlining the code.
- Added new query methods (Query2 to Query5 and QueryAsync6 to QueryAsync11) to enhance multi-mapping capabilities for the Foo.Customer type.
- Ensured all changes maintain the integrity of the Dapper.AOT functionality while improving readability and maintainability.
WIP: Partial implementation of multi-map query support (splitOn)
@devedse
Copy link
Author

devedse commented Dec 13, 2025

I might've been a little too eager since I checked a little further and it seems not all data is coming back correctly. I'll dig into that a little further

@devedse
Copy link
Author

devedse commented Dec 13, 2025

Ok I fixed the last remaining issues. It should work now.

@devedse
Copy link
Author

devedse commented Dec 14, 2025

Ok I fixed more last remaining issues. It should work now 😄

@devedse
Copy link
Author

devedse commented Dec 14, 2025

Okayyy... Now it's fixed... I think

@devedse
Copy link
Author

devedse commented Dec 14, 2025

Ok I fixed one more thing with enums not working. That's also in this PR now.

I've been trying to use the original Dapper as a reference

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