1212 */
1313public final class DBHelper {
1414
15- public static final String UTPLSQL_COMPATIBILITY_VERSION = "3.0.3 " ;
15+ public static final String UTPLSQL_COMPATIBILITY_VERSION = "3" ;
1616
1717 private DBHelper () {}
1818
@@ -96,6 +96,24 @@ public static boolean versionCompatibilityCheck(Connection conn)
9696 return versionCompatibilityCheck (conn , UTPLSQL_COMPATIBILITY_VERSION );
9797 }
9898
99+
100+ /** Checks if actual API-version is compatible with utPLSQL database version and throws a RuntimeException if not
101+ * Throws a RuntimeException if version compatibility can not be checked.
102+ *
103+ * @param conn Active db connection
104+ */
105+ public static void failOnVersionCompatibilityCheckFailed ( Connection conn )
106+ {
107+ try {
108+ if (!versionCompatibilityCheck (conn ))
109+ throw new RuntimeException ("API-Version " + UTPLSQL_COMPATIBILITY_VERSION + " not compatible with database. Aborting." );
110+ }
111+ catch ( SQLException e )
112+ {
113+ throw new RuntimeException ("Compatibility-check failed with error. Aborting." , e );
114+ }
115+ }
116+
99117 /**
100118 * Enable the dbms_output buffer with unlimited size.
101119 * @param conn the connection
@@ -119,21 +137,4 @@ public static void disableDBMSOutput(Connection conn) {
119137 System .out .println ("Failed to disable dbms_output." );
120138 }
121139 }
122-
123- /** Checks if actual API-version is compatible with utPLSQL database version and throws a RuntimeException if not
124- * Throws a RuntimeException if version compatibility can not be checked.
125- *
126- * @param conn
127- */
128- public static void failOnVersionCompatibilityCheckFailed ( Connection conn )
129- {
130- try {
131- if (!versionCompatibilityCheck (conn ))
132- throw new RuntimeException ("API-Version " + UTPLSQL_VERSION + " not compatible with database. Aborting." );
133- }
134- catch ( SQLException e )
135- {
136- throw new RuntimeException ("Compatibility-check failed with error. Aborting." , e );
137- }
138- }
139140}
0 commit comments