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

Oracle expects values for every parameter, even if the same parameter occurs twice #269

Open
stackwave opened this issue Jul 13, 2011 · 0 comments
Labels

Comments

@stackwave
Copy link

The existing NamedValueGatherer will skip parameters it has already seen. However, Oracle expects a value to be supplied for every parameter, even if that parameter occurs twice. As an example:

SELECT * FROM foo WHERE foo.a = :t0 AND foo.b = :t1 AND foo.c = :t0

One would expect that supplying exactly two parameters for :t0 and :t1 would be sufficient, but for Oracle, this is incorrect. Three parameters must be supplied, for :t0, :t1, and then :t0 again.

I introduced an if/else statement in SubSonic.Linq.Structure.ExecutionBuilder that checked whether the language being used was the OracleLanguage, and if so, used a special OracleNamedValueGatherer that paired every parameter name with its corresponding value regardless of whether it had already been seen. However, this may not be the most SubSonic-y way of doing things.

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

No branches or pull requests

1 participant