-
-
Notifications
You must be signed in to change notification settings - Fork 35
Added SplitOn functionality #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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>
…ed clarity and functionality
…n and improve readability
…eForNew method in CodeWriter
…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.
…eneric parameters
…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)
|
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 |
|
Ok I fixed the last remaining issues. It should work now. |
…le should be null
|
Ok I fixed more last remaining issues. It should work now 😄 |
… improve error messaging
|
Okayyy... Now it's fixed... I think |
…n with Dapper's logic
|
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 |
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