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

feat: support Types.REF_CURSOR #635

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@marschall
Contributor

marschall commented Sep 2, 2016

JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

  • register the type REF_CURSOR in TypeInfoCache
  • register the REF_CURSOR Oid
  • slightly relax the function return type check to continue allowing
    registering ref cursors with OTHER
  • add tests that verify ref cursors can be registered with both
    REF_CURSOR and OTHER
  • update PgDatabaseMetaData to report that we support ref cursors
  • update SimpleJdbc42Test to verify we correctly report ref cursor
    support

Fixes #633


testResult(Types.OTHER);
if (this.supportsRefCursor) {
testResult(Types.REF_CURSOR);

This comment has been minimized.

@vlsi

vlsi Sep 2, 2016

Member

Please, move that to another test method.
Test methods that have lots of assertions are harder to debug.

So a mere @Test testResultRefCursor() would make a difference

This comment has been minimized.

@marschall

marschall Sep 2, 2016

Contributor

Will do

@marschall marschall force-pushed the marschall:support-types-ref-cursor branch from b2319b9 to 874e4a0 Sep 2, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes #633

@marschall marschall force-pushed the marschall:support-types-ref-cursor branch from 874e4a0 to aa597f3 Sep 2, 2016

@codecov-io

This comment has been minimized.

codecov-io commented Sep 2, 2016

Current coverage is 61.91% (diff: 66.66%)

Merging #635 into master will decrease coverage by 0.02%

@@             master       #635   diff @@
==========================================
  Files           150        150          
  Lines         15154      15156     +2   
  Methods           0          0          
  Messages          0          0          
  Branches       3049       3050     +1   
==========================================
- Hits           9387       9384     -3   
- Misses         4517       4519     +2   
- Partials       1250       1253     +3   

Powered by Codecov. Last update 9030373...aa597f3

@vlsi vlsi added this to the 9.4.1210 milestone Sep 6, 2016

vlsi added a commit to vlsi/pgjdbc that referenced this pull request Sep 6, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes pgjdbc#633
closes pgjdbc#635

vlsi added a commit that referenced this pull request Sep 6, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes #633
closes #635

vlsi added a commit that referenced this pull request Sep 6, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes #633
closes #635

@vlsi vlsi closed this in 2777759 Sep 6, 2016

@vlsi

This comment has been minimized.

Member

vlsi commented Sep 6, 2016

@marschall , thanks for the contribution.
I refactored RefCursorTest to JUnit's @Parameterized: b5c3f59#diff-72ce5a85a03af41ff551d3033e0715caR37

vlsi added a commit that referenced this pull request Sep 6, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes #633
closes #635

zemian pushed a commit to zemian/pgjdbc that referenced this pull request Oct 6, 2016

feat: support Types.REF_CURSOR
JDBC 4.2 officially supports ref cursors through Types.REF_CURSOR.
Previously users had to use Types.OTHER for registering a ref cursor
out parameter. It is important to preserve this behavior in order to
keep existing code working.

This commit includes the following changes:

 - register the type REF_CURSOR in TypeInfoCache
 - register the REF_CURSOR Oid
 - slightly relax the function return type check to continue allowing
   registering ref cursors with OTHER
 - add tests that verify ref cursors can be registered with both
   REF_CURSOR and OTHER
 - update PgDatabaseMetaData to report that we support ref cursors
 - update SimpleJdbc42Test to verify we correctly report ref cursor
   support

Fixes pgjdbc#633
closes pgjdbc#635
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment