File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -777,11 +777,24 @@ static String selectNullString(int sqlType) {
777
777
return "nullif(" + literal + "," + literal + ')' ;
778
778
}
779
779
780
+ @ Override
781
+ public Boolean supportsRefCursors () {
782
+ // DB2 supports the binding with Types.REF_CURSOR but doesn't support statement.getObject(position, ResultSet.class)
783
+ return false ;
784
+ }
785
+
780
786
@ Override
781
787
public int registerResultSetOutParameter (CallableStatement statement , int col ) throws SQLException {
788
+ statement .registerOutParameter ( col ++, Types .REF_CURSOR );
782
789
return col ;
783
790
}
784
791
792
+ @ Override
793
+ public int registerResultSetOutParameter (CallableStatement statement , String name ) throws SQLException {
794
+ statement .registerOutParameter ( name , Types .REF_CURSOR );
795
+ return 1 ;
796
+ }
797
+
785
798
@ Override
786
799
public ResultSet getResultSet (CallableStatement ps ) throws SQLException {
787
800
boolean isResultSet = ps .execute ();
@@ -793,6 +806,16 @@ public ResultSet getResultSet(CallableStatement ps) throws SQLException {
793
806
return ps .getResultSet ();
794
807
}
795
808
809
+ @ Override
810
+ public ResultSet getResultSet (CallableStatement statement , int position ) throws SQLException {
811
+ return (ResultSet ) statement .getObject ( position );
812
+ }
813
+
814
+ @ Override
815
+ public ResultSet getResultSet (CallableStatement statement , String name ) throws SQLException {
816
+ return (ResultSet ) statement .getObject ( name );
817
+ }
818
+
796
819
@ Override
797
820
public boolean supportsCommentOn () {
798
821
return true ;
Original file line number Diff line number Diff line change @@ -843,11 +843,24 @@ public static String selectNullString(int sqlType) {
843
843
return "nullif(" + literal + "," + literal + ')' ;
844
844
}
845
845
846
+ @ Override
847
+ public Boolean supportsRefCursors () {
848
+ // DB2 supports the binding with Types.REF_CURSOR but doesn't support statement.getObject(position, ResultSet.class)
849
+ return false ;
850
+ }
851
+
846
852
@ Override
847
853
public int registerResultSetOutParameter (CallableStatement statement , int col ) throws SQLException {
854
+ statement .registerOutParameter ( col ++, Types .REF_CURSOR );
848
855
return col ;
849
856
}
850
857
858
+ @ Override
859
+ public int registerResultSetOutParameter (CallableStatement statement , String name ) throws SQLException {
860
+ statement .registerOutParameter ( name , Types .REF_CURSOR );
861
+ return 1 ;
862
+ }
863
+
851
864
@ Override
852
865
public ResultSet getResultSet (CallableStatement ps ) throws SQLException {
853
866
boolean isResultSet = ps .execute ();
@@ -859,6 +872,16 @@ public ResultSet getResultSet(CallableStatement ps) throws SQLException {
859
872
return ps .getResultSet ();
860
873
}
861
874
875
+ @ Override
876
+ public ResultSet getResultSet (CallableStatement statement , int position ) throws SQLException {
877
+ return (ResultSet ) statement .getObject ( position );
878
+ }
879
+
880
+ @ Override
881
+ public ResultSet getResultSet (CallableStatement statement , String name ) throws SQLException {
882
+ return (ResultSet ) statement .getObject ( name );
883
+ }
884
+
862
885
@ Override
863
886
public boolean supportsCommentOn () {
864
887
return true ;
You can’t perform that action at this time.
0 commit comments