public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); if (driverVendor == null) { DatabaseMetaData meta = conn.getMetaData(); if ("Informix".equalsIgnoreCase(meta.getDriverName())) driverVendor = VENDOR_DATADIRECT; else driverVendor = VENDOR_OTHER; } }
public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); if (isVersion9_2orLater(conn)) supportsSelectStartIndex = true; }
public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); if (isVersion9_2orLater(conn)) supportsSelectStartIndex = true; }
public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); if (isVersion9_2orLater(conn)) supportsSelectStartIndex = true; }
public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); if (isVersion9_2orLater(conn)) supportsSelectStartIndex = true; }
/** * Decorate the given connection if needed. Some databases require special * handling for JDBC bugs. This implementation issues any * {@link #initializationSQL} that has been set for the dictionary but * does not decoreate the connection. */ public Connection decorate(Connection conn) throws SQLException { if (!connected) connectedConfiguration(conn); if (!StringUtils.isEmpty(initializationSQL)) { PreparedStatement stmnt = null; try { stmnt = conn.prepareStatement(initializationSQL); stmnt.execute(); } catch (Exception e) { if (log.isTraceEnabled()) log.trace(e.toString(), e); } finally { if (stmnt != null) try { stmnt.close(); } catch (SQLException se) { } } } return conn; }
public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); DatabaseMetaData metaData = conn.getMetaData(); // The product version looks like 4.1.3-nt String productVersion = metaData.getDatabaseProductVersion(); // The driver version looks like mysql-connector-java-3.1.11 (...) String driverVersion = metaData.getDriverVersion(); try { int[] versions = getMajorMinorVersions(productVersion); int maj = versions[0]; int min = versions[1]; if (maj < 4 || (maj == 4 && min < 1)) { supportsSubselect = false; allowsAliasInBulkClause = false; } versions = getMajorMinorVersions(driverVersion); maj = versions[0]; if (maj < 5) { driverDeserializesBlobs = true; } } catch (IllegalArgumentException e) { // we don't understand the version format. // That is ok. We just take the default values. } }
/** * Decorate the given connection if needed. Some databases require special * handling for JDBC bugs. This implementation issues any * {@link #initializationSQL} that has been set for the dictionary but * does not decorate the connection. */ public Connection decorate(Connection conn) throws SQLException { if (!connected) connectedConfiguration(conn); if (!StringUtils.isEmpty(initializationSQL)) { PreparedStatement stmnt = null; try { stmnt = conn.prepareStatement(initializationSQL); stmnt.execute(); } catch (Exception e) { if (log.isTraceEnabled()) log.trace(e.toString(), e); } finally { if (stmnt != null) try { stmnt.close(); } catch (SQLException se) { } } } return conn; }
/** * Decorate the given connection if needed. Some databases require special * handling for JDBC bugs. This implementation issues any * {@link #initializationSQL} that has been set for the dictionary but * does not decorate the connection. */ public Connection decorate(Connection conn) throws SQLException { if (!connected) connectedConfiguration(conn); if (!StringUtils.isEmpty(initializationSQL)) { PreparedStatement stmnt = null; try { stmnt = conn.prepareStatement(initializationSQL); stmnt.execute(); } catch (Exception e) { if (log.isTraceEnabled()) log.trace(e.toString(), e); } finally { if (stmnt != null) try { stmnt.close(); } catch (SQLException se) { } } } return conn; }
@Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); DatabaseMetaData metaData = conn.getMetaData(); int maj = 0; int min = 0; try { // The product version looks like 4.1.3-nt or 5.1.30 String productVersion = metaData.getDatabaseProductVersion(); int[] versions = getMajorMinorVersions(productVersion); maj = versions[0]; min = versions[1]; } catch (IllegalArgumentException e) { // we don't understand the version format. // That is ok. We just take the default values. if (log.isWarnEnabled()) log.warn(e.toString(), e); } supportsXMLColumn = true; }
@Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); DatabaseMetaData metaData = conn.getMetaData(); int maj = 0; int min = 0; try { // The product version looks like 4.1.3-nt or 5.1.30 String productVersion = metaData.getDatabaseProductVersion(); int[] versions = getMajorMinorVersions(productVersion); maj = versions[0]; min = versions[1]; } catch (IllegalArgumentException e) { // we don't understand the version format. // That is ok. We just take the default values. if (log.isWarnEnabled()) log.warn(e.toString(), e); } supportsXMLColumn = true; }
/** * Determine Firebird version and configure itself accordingly. */ @SuppressWarnings("unchecked") @Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); firebirdVersion = determineFirebirdVersion(conn); determineRangeSyntax(); if (firebirdVersion == FB_VERSION_21) selectWordSet.add("WITH"); if (!(firebirdVersion == FB_VERSION_21)) { crossJoinClause = "JOIN"; requiresConditionForCrossJoin = true; } if (firebirdVersion == FB_VERSION_15) { stringLengthFunction = "STRLEN({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "LTRIM(RTRIM({0}))"; alterSequenceSQL = alterSequenceSQLFB15; createSequenceSQL = createSequenceSQLFB15; } }
/** * Determine Firebird version and configure itself accordingly. */ @SuppressWarnings("unchecked") @Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); firebirdVersion = determineFirebirdVersion(conn); determineRangeSyntax(); if (firebirdVersion == FB_VERSION_21) selectWordSet.add("WITH"); if (!(firebirdVersion == FB_VERSION_21)) { crossJoinClause = "JOIN"; requiresConditionForCrossJoin = true; } if (firebirdVersion == FB_VERSION_15) { stringLengthFunction = "STRLEN({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "LTRIM(RTRIM({0}))"; alterSequenceSQL = alterSequenceSQLFB15; createSequenceSQL = createSequenceSQLFB15; } }
@Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); DatabaseMetaData metaData = conn.getMetaData(); int maj = 0; int min = 0; try { // The product version looks like 4.1.3-nt or 5.1.30 String productVersion = metaData.getDatabaseProductVersion(); int[] versions = getMajorMinorVersions(productVersion); maj = versions[0]; min = versions[1]; } catch (IllegalArgumentException e) { // we don't understand the version format. // That is ok. We just take the default values. if (log.isWarnEnabled()) log.warn(e.toString(), e); } supportsXMLColumn = true; }
@Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); DatabaseMetaData metaData = conn.getMetaData(); int maj = 0; int min = 0; try { // The product version looks like 4.1.3-nt or 5.1.30 String productVersion = metaData.getDatabaseProductVersion(); int[] versions = getMajorMinorVersions(productVersion); maj = versions[0]; min = versions[1]; } catch (IllegalArgumentException e) { // we don't understand the version format. // That is ok. We just take the default values. if (log.isWarnEnabled()) log.warn(e.toString(), e); } supportsXMLColumn = true; }
/** * Determine Firebird version and configure itself accordingly. */ @SuppressWarnings("unchecked") @Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); firebirdVersion = determineFirebirdVersion(conn); determineRangeSyntax(); if (firebirdVersion == FB_VERSION_21) selectWordSet.add("WITH"); if (!(firebirdVersion == FB_VERSION_21)) { crossJoinClause = "JOIN"; requiresConditionForCrossJoin = true; } if (firebirdVersion == FB_VERSION_15) { stringLengthFunction = "STRLEN({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "LTRIM(RTRIM({0}))"; alterSequenceSQL = alterSequenceSQLFB15; createSequenceSQL = createSequenceSQLFB15; } }
/** * Determine Firebird version and configure itself accordingly. */ @SuppressWarnings("unchecked") @Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn); firebirdVersion = determineFirebirdVersion(conn); determineRangeSyntax(); if (firebirdVersion == FB_VERSION_21) selectWordSet.add("WITH"); if (!(firebirdVersion == FB_VERSION_21)) { crossJoinClause = "JOIN"; requiresConditionForCrossJoin = true; } if (firebirdVersion == FB_VERSION_15) { stringLengthFunction = "STRLEN({0})"; trimLeadingFunction = "LTRIM({0})"; trimTrailingFunction = "RTRIM({0})"; trimBothFunction = "LTRIM(RTRIM({0}))"; alterSequenceSQL = alterSequenceSQLFB15; createSequenceSQL = createSequenceSQLFB15; } }
/** * Decorate the given connection if needed. Some databases require special * handling for JDBC bugs. This implementation issues any * {@link #initializationSQL} that has been set for the dictionary but * does not decorate the connection. */ public Connection decorate(Connection conn) throws SQLException { if (!connected) connectedConfiguration(conn); if (!StringUtil.isEmpty(initializationSQL)) { PreparedStatement stmnt = null; try { stmnt = conn.prepareStatement(initializationSQL); stmnt.execute(); } catch (Exception e) { if (log.isTraceEnabled()) log.trace(e.toString(), e); } finally { if (stmnt != null) try { stmnt.close(); } catch (SQLException se) { } } } return conn; }
/** * Decorate the given connection if needed. Some databases require special * handling for JDBC bugs. This implementation issues any * {@link #initializationSQL} that has been set for the dictionary but * does not decorate the connection. */ public Connection decorate(Connection conn) throws SQLException { if (!connected) connectedConfiguration(conn); if (!StringUtil.isEmpty(initializationSQL)) { PreparedStatement stmnt = null; try { stmnt = conn.prepareStatement(initializationSQL); stmnt.execute(); } catch (Exception e) { if (log.isTraceEnabled()) log.trace(e.toString(), e); } finally { if (stmnt != null) try { stmnt.close(); } catch (SQLException se) { } } } return conn; }
@Override public void connectedConfiguration(Connection conn) throws SQLException { super.connectedConfiguration(conn);