private void runInitialQueries(ProtocolConnection protoConnection, Properties info, Logger logger) throws SQLException { String dbVersion = protoConnection.getServerVersion(); if (dbVersion.compareTo("9.0") >= 0) { SetupQueryRunner.run(protoConnection, "SET extra_float_digits = 3", false); } String appName = info.getProperty("ApplicationName"); if (appName != null && dbVersion.compareTo("9.0") >= 0) { StringBuffer sql = new StringBuffer(); sql.append("SET application_name = '"); Utils.appendEscapedLiteral(sql, appName, protoConnection.getStandardConformingStrings()); sql.append("'"); SetupQueryRunner.run(protoConnection, sql.toString(), false); } }
V2Query(String query, boolean withParameters, ProtocolConnection pconn) { useEStringSyntax = pconn.getServerVersion() != null && pconn.getServerVersion().compareTo("8.1") > 0; boolean stdStrings = pconn.getStandardConformingStrings();
this.dbVersionNumber = protoConnection.getServerVersion(); this.compatible = info.getProperty("compatible", Driver.MAJORVERSION + "." + Driver.MINORVERSION);
private void runInitialQueries(ProtocolConnection protoConnection, Properties info, Logger logger) throws SQLException { String dbVersion = protoConnection.getServerVersion(); if (dbVersion.compareTo("9.0") >= 0) { SetupQueryRunner.run(protoConnection, "SET extra_float_digits = 3", false); } String appName = info.getProperty("ApplicationName"); if (appName != null && dbVersion.compareTo("9.0") >= 0) { StringBuffer sql = new StringBuffer(); sql.append("SET application_name = '"); Utils.appendEscapedLiteral(sql, appName, protoConnection.getStandardConformingStrings()); sql.append("'"); SetupQueryRunner.run(protoConnection, sql.toString(), false); } }
V2Query(String query, boolean withParameters, ProtocolConnection pconn) { useEStringSyntax = pconn.getServerVersion() != null && pconn.getServerVersion().compareTo("8.1") > 0; boolean stdStrings = pconn.getStandardConformingStrings();
V2Query(String query, boolean withParameters, ProtocolConnection pconn) { useEStringSyntax = pconn.getServerVersion() != null && pconn.getServerVersion().compareTo("8.1") > 0; boolean stdStrings = pconn.getStandardConformingStrings();
this.dbVersionNumber = protoConnection.getServerVersion(); this.compatible = info.getProperty("compatible", Driver.MAJORVERSION + "." + Driver.MINORVERSION);
this.dbVersionNumber = protoConnection.getServerVersion(); this.compatible = info.getProperty("compatible", Driver.MAJORVERSION + "." + Driver.MINORVERSION);