public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException { super(host, port, user, database, info, url); TypeInfo types = getTypeInfo(); if (haveMinimumServerVersion("8.3")) { types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY); } _clientInfo = new Properties(); if (haveMinimumServerVersion("9.0")) { String appName = info.getProperty("ApplicationName"); if (appName == null) { appName = ""; } _clientInfo.put("ApplicationName", appName); } }
public Array createArrayOf(String typeName, Object[] elements) throws SQLException { checkClosed(); int oid = getTypeInfo().getPGArrayType(typeName); if (oid == Oid.UNSPECIFIED) throw new PSQLException(GT.tr("Unable to find server array type for provided name {0}.", typeName), PSQLState.INVALID_NAME); StringBuffer sb = new StringBuffer(); appendArray(sb, elements); // This will not work once we have a JDBC 5, // but it'll do for now. return new Jdbc4Array(this, oid, sb.toString()); }
public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException { super(host, port, user, database, info, url); TypeInfo types = getTypeInfo(); if (haveMinimumServerVersion("8.3")) { types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY); } _clientInfo = new Properties(); if (haveMinimumServerVersion("9.0")) { String appName = info.getProperty("ApplicationName"); if (appName == null) { appName = ""; } _clientInfo.put("ApplicationName", appName); } }
public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException { super(host, port, user, database, info, url); TypeInfo types = getTypeInfo(); if (haveMinimumServerVersion("8.3")) { types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY); } }
public Array createArrayOf(String typeName, Object[] elements) throws SQLException { int oid = getTypeInfo().getPGArrayType(typeName); if (oid == Oid.UNSPECIFIED) throw new PSQLException(GT.tr("Unable to find server array type for provided name {0}.", typeName), PSQLState.INVALID_NAME); StringBuffer sb = new StringBuffer(); appendArray(sb, elements); // This will not work once we have a JDBC 5, // but it'll do for now. return new Jdbc4Array(this, oid, sb.toString()); }
public Array createArrayOf(String typeName, Object[] elements) throws SQLException { checkClosed(); int oid = getTypeInfo().getPGArrayType(typeName); if (oid == Oid.UNSPECIFIED) throw new PSQLException(GT.tr("Unable to find server array type for provided name {0}.", typeName), PSQLState.INVALID_NAME); StringBuffer sb = new StringBuffer(); appendArray(sb, elements); // This will not work once we have a JDBC 5, // but it'll do for now. return new Jdbc4Array(this, oid, sb.toString()); }