org.culturegraph.mf.sql.util
Enum JdbcUtil.Bug

java.lang.Object
  extended by java.lang.Enum<JdbcUtil.Bug>
      extended by org.culturegraph.mf.sql.util.JdbcUtil.Bug
All Implemented Interfaces:
Serializable, Comparable<JdbcUtil.Bug>
Enclosing class:
JdbcUtil

public static enum JdbcUtil.Bug
extends Enum<JdbcUtil.Bug>

Helper class to manage bugs found in various JDBC drivers in a clear way.

Author:
Christoph Böhme

Enum Constant Summary
GET_RESULT_SET_THROWS_ILLEGAL_EXCEPTION
          The Sqlite JDBC driver does not return null if the current result is not a result set but throws an exception instead.
GET_UPDATE_COUNT_THROWS_ILLEGAL_EXCEPTION
          The Sqlite JDBC driver does not return -1 if the current result is not an update count but throws an exception instead.
RESULT_SET_STREAMING_ONLY_IF_FETCH_SIZE_IS_MIN_VALUE
          The MySQL Connector/J only streams result sets if statements are configured with a fetch size of Integer.MIN_VALUE and the options TYPE_FORWARD_ONLY and CONCUR_READ_ONLY.
RETURN_GENERATED_KEYS_PRODUCES_INVALID_SQL
          The Postgresql JDBC driver simply tacks a RETURNING-clause to the sql statement without checking if the statement supports this clause.
 
Method Summary
static JdbcUtil.Bug valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JdbcUtil.Bug[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RETURN_GENERATED_KEYS_PRODUCES_INVALID_SQL

public static final JdbcUtil.Bug RETURN_GENERATED_KEYS_PRODUCES_INVALID_SQL
The Postgresql JDBC driver simply tacks a RETURNING-clause to the sql statement without checking if the statement supports this clause.


GET_RESULT_SET_THROWS_ILLEGAL_EXCEPTION

public static final JdbcUtil.Bug GET_RESULT_SET_THROWS_ILLEGAL_EXCEPTION
The Sqlite JDBC driver does not return null if the current result is not a result set but throws an exception instead.


GET_UPDATE_COUNT_THROWS_ILLEGAL_EXCEPTION

public static final JdbcUtil.Bug GET_UPDATE_COUNT_THROWS_ILLEGAL_EXCEPTION
The Sqlite JDBC driver does not return -1 if the current result is not an update count but throws an exception instead.


RESULT_SET_STREAMING_ONLY_IF_FETCH_SIZE_IS_MIN_VALUE

public static final JdbcUtil.Bug RESULT_SET_STREAMING_ONLY_IF_FETCH_SIZE_IS_MIN_VALUE
The MySQL Connector/J only streams result sets if statements are configured with a fetch size of Integer.MIN_VALUE and the options TYPE_FORWARD_ONLY and CONCUR_READ_ONLY. See https://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html for details. Since this fetch size setting does not seem to be specified JDBC behaviour, we handle it as a special case.

Method Detail

values

public static JdbcUtil.Bug[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JdbcUtil.Bug c : JdbcUtil.Bug.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JdbcUtil.Bug valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2014. All Rights Reserved.