Skip to content

Add custom file mapping support #14

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

Merged
merged 3 commits into from
Jul 23, 2017

Conversation

viniciusam
Copy link
Member

Added support for custom file mappings on the java api/client. I think it's working, but need some improvements.

One thing I noticed is the ut_file_mapper use default values on the function declaration, and because of that, if I want to use default parameters when user pass null values, I need to:

  • build different sql queries
  • or get default values from database before calling the build_file_mappings

For now, custom mapping only works if you pass all parameters.

@viniciusam viniciusam merged commit a4d0f54 into utPLSQL:develop Jul 23, 2017
@jgebal
Copy link
Member

jgebal commented Jul 23, 2017

Hi @viniciusam,
If we need a change on the mapper, to make it more useful for Java API, we definitely should do so.
Do you see what would be the best way to have it implemented in PLSQL?
Maybe it should be some kind of builder?

@jgebal
Copy link
Member

jgebal commented Jul 23, 2017

Or maybe, ut_file_mapper should just have NULL defaults.
Inside the function if parameter is passed as null, then the code would assign defaults.
What do you think?
That way you could call it from Java passing null params and DB would take care of it.
I actually think it's a nice solution. Would you be able to implement it?

@viniciusam
Copy link
Member Author

Yes, good solution. I can implement it.

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.

2 participants