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 has no out parameters support #263

Open
PotatoTroll opened this issue Feb 11, 2016 · 3 comments
Open

Oracle has no out parameters support #263

PotatoTroll opened this issue Feb 11, 2016 · 3 comments

Comments

@PotatoTroll
Copy link

Very helpful MicroORM so far, but it seems that there is no support for output bind variables at all for oracle, the simplest example: BEGIN :0 := 333; END; won't do a thing, it seems that all bind variables are set as input.
Is there even a possible way for an elegant implementation for output bind variables for oracle ?

@FransBouma
Copy link
Owner

output parameters have to be put into something, how do you propose the API and usage of such an API looks like? I.e. how does code using that look like? Besides, output parameters in a query in massive, how should these be specified? IMHO that's not that simple (as the short-hand for parameters is lacking any directive).

@PotatoTroll
Copy link
Author

Not sure at the moment how all this would work in .NET, but the only way I can think of is to bind all variables as InputOutput and pass them by reference. Need to check if it is possible in .NET, but you are right, no matter the way to do it, it will look ugly.

@PotatoTroll
Copy link
Author

One solution: I created another DB.Current.Query like method, it binds all variables as InputOutput, and returns an array of all the resulted parameters being it IN or OUT. Works ok so far, the only problem I cannot pass null for a variable that should be OUT, oracle will throw an exception because buffer is to small.

This was referenced Feb 3, 2017
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

No branches or pull requests

2 participants