Skip to content
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

fix: dont report DAP037 on array types #125

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

DeagleGross
Copy link
Collaborator

I believe this is a correct usage of where result type is either userType[] or primitiveType[].

await conn.Query<byte[]>(...)

We should not report the DAP037, because lets say byte[] does not have accessible fields\properties, but it is valid expected result type.

Closes #123

@DeagleGross DeagleGross requested a review from mgravell August 22, 2024 21:45
@DeagleGross DeagleGross self-assigned this Aug 22, 2024
@mgravell
Copy link
Member

I don't think we want to unwrap every array type - semantically I'm not sure what string[], int[] etc mean, so we shouldn't IMO pretend to understand them. Instead, I think we should recognize explicitly and only byte[] (and possibly sbyte[], although I don't think Dapper vanilla supports the latter), to interpret as BLOB data.

@mgravell
Copy link
Member

Nice, thanks

@mgravell mgravell merged commit d2bb973 into DapperLib:main Aug 30, 2024
2 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.

DAP037 error when return type is an array
2 participants