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

Add support for inserting Oracle object types #172

Merged
merged 6 commits into from
Oct 8, 2013

Conversation

javornikolov
Copy link
Contributor

Address #169 - support inserting of Oracle Object Types.
(Merge this after #171)

@Override
protected void afterConnectionEstablished() throws SQLException {
super.afterConnectionEstablished();
TypeAdapter.registerParseDelegate(java.sql.Struct.class,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially I tried to do this registration in the constructor but for some reason it failed: connection wasn't open while trying to parse (even when accessing it lazy via OracleEnvironment.getConnection).

@javornikolov
Copy link
Contributor Author

Hmm, some leftovers here - since I rebased on old version of #171, need to be cleaned up. [FIXED]

@benilovj
Copy link
Member

benilovj commented Oct 8, 2013

OK, looks good to me.

Would it be worth adding a test or two for the Oracle spacial types mentioned in #169?

@javornikolov
Copy link
Contributor Author

Yes, I'll add one. (I wasn't sure if Spatial is included in Oracle Express edition but seems it is - at least some part of it).

create table persons(reg_id integer, member person_type);

-- A table with spatial objects
create table spatial_line(objectid integer, geometry sdo_geometry);
Copy link
Member

Choose a reason for hiding this comment

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

now, unless we reuse this in other places, I'd probably prefer to create (and drop) this within the test. This would make the test more explicit.

Same applies for person_type and persons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue with DDL like create, drop, etc. statements is that they're committing the transaction.
But the tests are quite small so perhaps won't be a huge trouble to break that single transaction guideline in this case.

Copy link
Member

Choose a reason for hiding this comment

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

In any case, this is done in a lot of other tests, eg this one.

benilovj added a commit that referenced this pull request Oct 8, 2013
…ort-169

Add support for inserting Oracle object types
@benilovj benilovj merged commit 354458d into master Oct 8, 2013
@benilovj benilovj deleted the oracle-object-types-insert-support-169 branch October 8, 2013 23:06
@benilovj
Copy link
Member

benilovj commented Oct 8, 2013

great work again, @javornikolov

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.

None yet

2 participants