|
@@ -31,9 +31,10 @@ public class HPCCConnection implements Connection
|
|
public static final String SERVERADDRESSDEFAULT = "localhost";
|
|
public static final String SERVERADDRESSDEFAULT = "localhost";
|
|
public static final String WSECLWATCHPORTDEFAULT = "8010";
|
|
public static final String WSECLWATCHPORTDEFAULT = "8010";
|
|
public static final String WSECLPORTDEFAULT = "8002";
|
|
public static final String WSECLPORTDEFAULT = "8002";
|
|
- public static final String WSECLDIRECTPORTDEFAULT = "8008";
|
|
|
|
|
|
+ public static final String WSECLDIRECTPORTDEFAULT = "8010";
|
|
public static final int FETCHPAGESIZEDEFAULT = 100;
|
|
public static final int FETCHPAGESIZEDEFAULT = 100;
|
|
public static final String LAZYLOADDEFAULT = "true";
|
|
public static final String LAZYLOADDEFAULT = "true";
|
|
|
|
+ public static final int CONNECTTIMEOUTMILDEFAULT = 1000;
|
|
|
|
|
|
private boolean closed;
|
|
private boolean closed;
|
|
private HPCCDatabaseMetaData metadata;
|
|
private HPCCDatabaseMetaData metadata;
|
|
@@ -87,6 +88,9 @@ public class HPCCConnection implements Connection
|
|
if (!this.props.containsKey("PageSize") || !HPCCJDBCUtils.isNumeric(this.props.getProperty("PageSize")))
|
|
if (!this.props.containsKey("PageSize") || !HPCCJDBCUtils.isNumeric(this.props.getProperty("PageSize")))
|
|
this.props.setProperty("PageSize", String.valueOf(FETCHPAGESIZEDEFAULT));
|
|
this.props.setProperty("PageSize", String.valueOf(FETCHPAGESIZEDEFAULT));
|
|
|
|
|
|
|
|
+ if (!this.props.containsKey("ConnectTimeoutMilli") || !HPCCJDBCUtils.isNumeric(this.props.getProperty("ConnectTimeoutMilli")))
|
|
|
|
+ this.props.setProperty("ConnectTimeoutMilli", String.valueOf(CONNECTTIMEOUTMILDEFAULT));
|
|
|
|
+
|
|
boolean setdefaultreslim = false;
|
|
boolean setdefaultreslim = false;
|
|
if (this.props.containsKey("EclResultLimit"))
|
|
if (this.props.containsKey("EclResultLimit"))
|
|
{
|
|
{
|
|
@@ -164,257 +168,206 @@ public class HPCCConnection implements Connection
|
|
this.metadata = metadata;
|
|
this.metadata = metadata;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Statement createStatement() throws SQLException {
|
|
public Statement createStatement() throws SQLException {
|
|
return new HPCCPreparedStatement(this, null);
|
|
return new HPCCPreparedStatement(this, null);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String query) throws SQLException {
|
|
public PreparedStatement prepareStatement(String query) throws SQLException {
|
|
return new HPCCPreparedStatement(this, query);
|
|
return new HPCCPreparedStatement(this, query);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public CallableStatement prepareCall(String sql) throws SQLException {
|
|
public CallableStatement prepareCall(String sql) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(string sql) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(string sql) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public String nativeSQL(String sql) throws SQLException {
|
|
public String nativeSQL(String sql) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: nativeSQL(string sql) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: nativeSQL(string sql) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setAutoCommit(boolean autoCommit) throws SQLException {
|
|
public void setAutoCommit(boolean autoCommit) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setAutoCommit(boolean autoCommit) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setAutoCommit(boolean autoCommit) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public boolean getAutoCommit() throws SQLException {
|
|
public boolean getAutoCommit() throws SQLException {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void commit() throws SQLException {
|
|
public void commit() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: commit Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: commit Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void rollback() throws SQLException {
|
|
public void rollback() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void close() throws SQLException {
|
|
public void close() throws SQLException {
|
|
closed = true;
|
|
closed = true;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public boolean isClosed() throws SQLException {
|
|
public boolean isClosed() throws SQLException {
|
|
return closed;
|
|
return closed;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public DatabaseMetaData getMetaData() throws SQLException {
|
|
public DatabaseMetaData getMetaData() throws SQLException {
|
|
return metadata;
|
|
return metadata;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setReadOnly(boolean readOnly) throws SQLException {
|
|
public void setReadOnly(boolean readOnly) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setReadOnly Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setReadOnly Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public boolean isReadOnly() throws SQLException {
|
|
public boolean isReadOnly() throws SQLException {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setCatalog(String catalog) throws SQLException {
|
|
public void setCatalog(String catalog) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setCatalog Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setCatalog Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public String getCatalog() throws SQLException
|
|
public String getCatalog() throws SQLException
|
|
{
|
|
{
|
|
- // throw new UnsupportedOperationException("EclConnection: getCatalog Not supported yet.");
|
|
|
|
- return "myroxie";
|
|
|
|
|
|
+ return props.getProperty("Cluster", CLUSTERDEFAULT);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setTransactionIsolation(int level) throws SQLException {
|
|
public void setTransactionIsolation(int level) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: settransactionisolation Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: settransactionisolation Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public int getTransactionIsolation() throws SQLException {
|
|
public int getTransactionIsolation() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: getTransactionIsolation Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: getTransactionIsolation Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public SQLWarning getWarnings() throws SQLException {
|
|
public SQLWarning getWarnings() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: getWarnings Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: getWarnings Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void clearWarnings() throws SQLException {
|
|
public void clearWarnings() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: clearWarnings Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: clearWarnings Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
System.out.println("##Statement EclConnection::createStatement(resulttype, resultsetcon)##");
|
|
System.out.println("##Statement EclConnection::createStatement(resulttype, resultsetcon)##");
|
|
return new HPCCPreparedStatement(this, null);
|
|
return new HPCCPreparedStatement(this, null);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String query, int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
public PreparedStatement prepareStatement(String query, int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
System.out.println("##EclConnection::createStatement("+ query +", resultsetype, resultsetcon)##");
|
|
System.out.println("##EclConnection::createStatement("+ query +", resultsetype, resultsetcon)##");
|
|
return new HPCCPreparedStatement(this, query);
|
|
return new HPCCPreparedStatement(this, query);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Map<String, Class<?>> getTypeMap() throws SQLException {
|
|
public Map<String, Class<?>> getTypeMap() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: getTypeMap Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: getTypeMap Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
|
|
public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setTypeMap Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setTypeMap Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setHoldability(int holdability) throws SQLException {
|
|
public void setHoldability(int holdability) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setHoldability Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setHoldability Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public int getHoldability() throws SQLException {
|
|
public int getHoldability() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: getHoldability Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: getHoldability Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Savepoint setSavepoint() throws SQLException {
|
|
public Savepoint setSavepoint() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Savepoint setSavepoint(String name) throws SQLException {
|
|
public Savepoint setSavepoint(String name) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void rollback(Savepoint savepoint) throws SQLException {
|
|
public void rollback(Savepoint savepoint) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
|
|
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: releaseSavepoint Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: releaseSavepoint Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createStatement Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createStatement Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
|
|
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int autoGeneratedKeys) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int autoGeneratedKeys) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
|
|
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int[] columnIndexes) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, int[] columnIndexes) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
|
|
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, String[] columnNames) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: prepareStatement(String sql, String[] columnNames) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Clob createClob() throws SQLException {
|
|
public Clob createClob() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createClob Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createClob Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Blob createBlob() throws SQLException {
|
|
public Blob createBlob() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createBlob Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createBlob Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public NClob createNClob() throws SQLException {
|
|
public NClob createNClob() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createNClob Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createNClob Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public SQLXML createSQLXML() throws SQLException {
|
|
public SQLXML createSQLXML() throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createSQLXML Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createSQLXML Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public boolean isValid(int timeout) throws SQLException {
|
|
public boolean isValid(int timeout) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: isValid Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: isValid Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setClientInfo(String name, String value) throws SQLClientInfoException {
|
|
public void setClientInfo(String name, String value) throws SQLClientInfoException {
|
|
System.out.println("ECLCONNECTION SETCLIENTINFO");
|
|
System.out.println("ECLCONNECTION SETCLIENTINFO");
|
|
clientInfo.put(name, value);
|
|
clientInfo.put(name, value);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public void setClientInfo(Properties properties) throws SQLClientInfoException {
|
|
public void setClientInfo(Properties properties) throws SQLClientInfoException {
|
|
System.out.println("ECLCONNECTION SETCLIENTINFO");
|
|
System.out.println("ECLCONNECTION SETCLIENTINFO");
|
|
clientInfo = properties;
|
|
clientInfo = properties;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public String getClientInfo(String name) throws SQLException {
|
|
public String getClientInfo(String name) throws SQLException {
|
|
System.out.println("ECLCONNECTION GETCLIENTINFO");
|
|
System.out.println("ECLCONNECTION GETCLIENTINFO");
|
|
return (String)clientInfo.getProperty(name);
|
|
return (String)clientInfo.getProperty(name);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Properties getClientInfo() throws SQLException {
|
|
public Properties getClientInfo() throws SQLException {
|
|
System.out.println("ECLCONNECTION GETCLIENTINFO");
|
|
System.out.println("ECLCONNECTION GETCLIENTINFO");
|
|
return clientInfo;
|
|
return clientInfo;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
|
|
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createArrayOf(String typeName, Object[] elements) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createArrayOf(String typeName, Object[] elements) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
|
|
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: createStruct(String typeName, Object[] attributes)Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: createStruct(String typeName, Object[] attributes)Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public <T> T unwrap(Class<T> iface) throws SQLException {
|
|
public <T> T unwrap(Class<T> iface) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: unwrap(Class<T> iface) Not supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: unwrap(Class<T> iface) Not supported yet.");
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
|
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
|
throw new UnsupportedOperationException("EclConnection: isWrapperFor(Class<?> iface) sNot supported yet.");
|
|
throw new UnsupportedOperationException("EclConnection: isWrapperFor(Class<?> iface) sNot supported yet.");
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|