public final class EmbeddedConnection
extends nl.cwi.monetdb.jdbc.MonetConnection
Connection suitable for the MonetDB database using an embedded connection.conn_props, hash, language, protocolTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
EmbeddedConnection(Properties props,
String hash,
String language,
String directory) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeUnderlyingConnection()
Closes the underlying connection implementation.
|
List<String> |
connect(String user,
String pass)
Connects to the existing database on the JVM process.
|
MonetDBEmbeddedConnection |
getAsMonetDBEmbeddedConnection()
Makes a conversion of this connection as a
MonetDBEmbeddedConnection instance, making it possible to
access the MonetDBEmbeddedConnection API on a JDBC embedded connection, although that API doesn't follow
the JDBC specification. |
int |
getBlockSize()
Gets the underlying connection block size length.
|
int |
getDefFetchsize()
Gets the underlying connection default fetch size for DataBlock responses.
|
String |
getDirectory()
Gets the directory where the database is hosted.
|
String |
getJDBCURL()
Gets the underlying connection JDBC String URL.
|
int |
getSoTimeout()
In a embedded connection there is no timeout, so this methods always adds a
SQLWarning and returns -1. |
int |
initialStringBuilderSize() |
void |
sendControlCommand(int commandID,
int data)
Sends a control command to the server.
|
void |
setSoTimeout(int timeout)
In a embedded connection there is no timeout, so this methods always adds a
SQLWarning and the timeout
parameter is ignored. |
abort, addWarning, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, finalize, getAutoCommit, getBlobAsBinary, getCatalog, getClientInfo, getClientInfo, getClobAsLongChar, getHoldability, getLanguage, getMetaData, getNetworkTimeout, getProtocol, getSchema, getSeqCounter, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isEmbedded, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, toStringclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitisWrapperFor, unwrappublic EmbeddedConnection(Properties props, String hash, String language, String directory) throws IOException
IOExceptionpublic String getDirectory()
public MonetDBEmbeddedConnection getAsMonetDBEmbeddedConnection()
MonetDBEmbeddedConnection instance, making it possible to
access the MonetDBEmbeddedConnection API on a JDBC embedded connection, although that API doesn't follow
the JDBC specification.MonetDBEmbeddedConnection instancepublic List<String> connect(String user, String pass) throws IOException, nl.cwi.monetdb.mcl.protocol.ProtocolException, nl.cwi.monetdb.mcl.connection.MCLException
MCLException will be thrown.
connect in class nl.cwi.monetdb.jdbc.MonetConnectionuser - The user name to authenticate (ignored)pass - The user's password (ignored)nl.cwi.monetdb.mcl.connection.MCLException - If the database is already running in a different directoryIOExceptionnl.cwi.monetdb.mcl.protocol.ProtocolExceptionpublic String getJDBCURL()
getJDBCURL in class nl.cwi.monetdb.jdbc.MonetConnectionpublic int getBlockSize()
getBlockSize in class nl.cwi.monetdb.jdbc.MonetConnectionpublic int getDefFetchsize()
getDefFetchsize in class nl.cwi.monetdb.jdbc.MonetConnectionpublic int initialStringBuilderSize()
initialStringBuilderSize in class nl.cwi.monetdb.jdbc.MonetConnectionpublic int getSoTimeout()
SQLWarning and returns -1.getSoTimeout in class nl.cwi.monetdb.jdbc.MonetConnectionpublic void setSoTimeout(int timeout)
SQLWarning and the timeout
parameter is ignored.setSoTimeout in class nl.cwi.monetdb.jdbc.MonetConnectiontimeout - The specified timeout, in milliseconds (ignored)public void closeUnderlyingConnection()
throws IOException
closeUnderlyingConnection in class nl.cwi.monetdb.jdbc.MonetConnectionIOException - if an error happens while closing the connection or the databasepublic void sendControlCommand(int commandID,
int data)
throws SQLException
sendControlCommand in class nl.cwi.monetdb.jdbc.MonetConnectioncommandID - the command identifier according to ControlCommands listingdata - The integer to send according to the control commandSQLException - if an IO exception or a database error occursCopyright © 2017. All rights reserved.