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

Ensure parameter false positives are detected #60

Closed
mgravell opened this issue Oct 10, 2023 · 0 comments · Fixed by #118
Closed

Ensure parameter false positives are detected #60

mgravell opened this issue Oct 10, 2023 · 0 comments · Fixed by #118
Assignees
Labels

Comments

@mgravell
Copy link
Member

See DapperLib/Dapper#1914 and DapperLib/Dapper#1971

In analyzer mode (not in generator mode), we should be able to detect the following queries as problematic, i.e. the true parameters are not the same as Dapper is going to assume:

select 'this ? looks like OLE DB'

and

select 'this ?looks? like pseudo-positional

The problem here is that the runtime SQL parser in Dapper detects both of these as meaning the wrong thing; they aren't parameters. Our existing parameter handler in TSQL should be able to detect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants