VerticaConnection
- All Superinterfaces: java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper
All Known Subinterfaces: VerticaRoutableConnection
public interface VerticaConnection
extends java.sql.Connection
This interface defines the public Vertica Analytic Database extensions to java.sql.Connection. All Connections constructed by the Vertica JDBC driver implement VerticaStatement.
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| VerticaDatabaseErrorInfo | getLastDatabaseError() Returns information about the most recent database error that occurred on this connection. |
| java.lang.Object | getProperty(java.lang.String name) Returns the value of a Vertica specific property on this connection. |
| void | setProperty(java.lang.String name, java.lang.Object value) Sets a Vertica specific property on this connection. |
Methods inherited from interface java.sql.Connection
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, 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
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
Method Detail
setProperty
void setProperty(java.lang.String name,
java.lang.Object value)
throws java.sql.SQLException
Sets a Vertica specific property on this connection. Normally a connection's properties are determined by the connection string when the connection is created. This method allows some properties to be changed after the Connection has been created.
Any Statement or PreparedStatement created by this connection will inherit the property values set here. Parameters:name - The name of a connection property.value - The value of the connection property. Throws: java.sql.SQLException - If name is not a valid property name or value is not a valid property value.
getProperty
java.lang.Object getProperty(java.lang.String name)
throws java.sql.SQLException
Returns the value of a Vertica specific property on this connection. Parameters:name - The name of the property to look up. Returns The value of the property, or null if the property has no value. Throws: java.sql.SQLException - If the property lookup fails because of an invalid name.
getLastDatabaseError
VerticaDatabaseErrorInfo getLastDatabaseError()
Returns information about the most recent database error that occurred on this connection.
The information returned by this method may also be accessed via the v_monitor.error_messages system table.
After a SQLException is thrown as a result of a server-side error, this method will return context information about that error.
If the most recent operation did not throw a SQLException, or if the SQLException thrown was the result of a purely client-side error, then null is returned.
The error information is discarded at the start of any operation that requires communication with the database server. Returns database error info instance