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) |
EmbeddedConnection(Properties props,
String hash,
String language,
String directory,
Boolean silentFlag,
Boolean sequentialFlag) |
| 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.
|
protected boolean |
executeNextQueryBatch(nl.cwi.monetdb.jdbc.MonetStatement statement,
List<String> batch,
int[] counts,
BatchUpdateException e)
Execute a batch query in an embedded connection.
|
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() |
boolean |
isRunningInMemory()
Is the connection running in memory?
|
boolean |
isSequentialFlag()
Is the sequential flag set?
|
boolean |
isSilentFlag()
Is the silent flag set?
|
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, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, finalize, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getLanguage, getMetaData, getNetworkTimeout, getProtocol, getSchema, getSeqCounter, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isEmbedded, isReadOnly, isValid, mapBlobAsVarBinary, mapClobAsVarChar, 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)
public String getDirectory()
public boolean isRunningInMemory()
public boolean isSilentFlag()
public boolean isSequentialFlag()
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()
throws SocketException
SQLWarning and returns -1.getSoTimeout in class nl.cwi.monetdb.jdbc.MonetConnectionSocketExceptionpublic void setSoTimeout(int timeout)
throws SocketException
SQLWarning and the timeout
parameter is ignored.setSoTimeout in class nl.cwi.monetdb.jdbc.MonetConnectiontimeout - The specified timeout, in milliseconds (ignored)SocketExceptionpublic 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 occursprotected boolean executeNextQueryBatch(nl.cwi.monetdb.jdbc.MonetStatement statement,
List<String> batch,
int[] counts,
BatchUpdateException e)
throws SQLException
executeNextQueryBatch in class nl.cwi.monetdb.jdbc.MonetConnectionstatement - The original MonetStatement where the batch comes frombatch - The list of queries to executecounts - The return of the update statement of each input querye - An exception to be thrown if an error occursSQLException - if an IO exception or a database error occursCopyright © 2018. All rights reserved.