Skip to content

Add support for Oracle nested tables and varrays as stored procedures arguments#347

Merged
javornikolov merged 5 commits intodbfit:masterfrom
avskor:master
Oct 25, 2014
Merged

Add support for Oracle nested tables and varrays as stored procedures arguments#347
javornikolov merged 5 commits intodbfit:masterfrom
avskor:master

Conversation

@avskor
Copy link
Copy Markdown
Contributor

@avskor avskor commented Oct 23, 2014

Support for Oracle collections (nested tables and varrays) as stored procedures parameters.

Partially resolves #57

@benilovj
Copy link
Copy Markdown
Member

@avskor, thanks for the PR!

From the Java point of view, this looks broadly ok.

Adding another parameter to the initialiser for DbParameterAccessor feels wrong (it's got 5 already). If it's possible to extract some new class that encapsulates some of the parameters, that'd be ideal, but probably not a blocker.

I'll defer the Oracle part to @javornikolov since I'm so far out of the loop with DBs at the moment.

@avskor
Copy link
Copy Markdown
Contributor Author

avskor commented Oct 24, 2014

I agree, the number of parameters is large, but I have tried to minimize changes in core classes

@javornikolov
Copy link
Copy Markdown
Contributor

Thank you @avskor! I'll review this PR soon.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be one space only here after paramPosition,.

@avskor
Copy link
Copy Markdown
Contributor Author

avskor commented Oct 24, 2014

Extra space removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proper syntax is to have force option after the type name:

create or replace force type person_type_tab as table of person_type

Otherwise it seems to be ignored and you face error if dependent objects (like the table of person_type) exist:

create or replace force type person_type as object(id number, name varchar2(50 char))
*
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents

@javornikolov
Copy link
Copy Markdown
Contributor

It's working fine and except my minor remarks about force option and Execute Ddl - the rest looks good to me.

@avskor
Copy link
Copy Markdown
Contributor Author

avskor commented Oct 25, 2014

Fixed. Execute Ddl used for ddl operation, force option moved after type name

@javornikolov
Copy link
Copy Markdown
Contributor

Great :-) @anaclcastro, thank you very much for your contribution! Merging...

@javornikolov javornikolov changed the title Add support for oracle nested tables and varrays Add support for Oracle nested tables and varrays as stored procedures arguments Oct 25, 2014
@javornikolov javornikolov added this to the Next milestone Oct 25, 2014
javornikolov added a commit that referenced this pull request Oct 25, 2014
Add support for Oracle nested tables and varrays as stored procedures arguments
@javornikolov javornikolov merged commit 7829f03 into dbfit:master Oct 25, 2014
@javornikolov javornikolov mentioned this pull request Aug 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Oracle collection types

3 participants