This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
JDBC API
The Vertica JDBC API is a Java client interface for connecting applications to Vertica and working with database data. Use the reference pages below when developing applications that use the Vertica JDBC driver.
For instructions on configuring and using the JDBC client, see Accessing Vertica with JDBC.
The reference is organized into packages and classes. Package pages group related API types, while class pages document constructors, methods, fields, and interfaces.
Classes
Browse all classes in the JDBC API:
Packages
Browse classes organized by package:
1 - Class Hierarchy
com.vertica.jdbc.common.BaseConnectionFactory
com.vertica.jdbc.common.AbstractDataSource (implements javax.sql.ConnectionPoolDataSource, javax.sql.DataSource)
com.vertica.jdbc.hybrid.HybridAbstractDataSource
com.vertica.jdbc.DataSource (implements javax.sql.DataSource)
- com.vertica.jdbc.common.AbstractDriver (implements java.sql.Driver)
com.vertica.jdbc.hybrid.HybridAbstractDriver
com.vertica.jdbc.Driver
- com.vertica.dsi.dataengine.utilities.DSIMonthSpan (implements java.lang.Cloneable)
com.vertica.jdbc.VerticaYearMonthInterval (implements java.lang.Cloneable)
- com.vertica.dsi.dataengine.utilities.DSITimeSpan (implements java.lang.Cloneable)
com.vertica.jdbc.VerticaDayTimeInterval (implements java.lang.Cloneable)
Interface Hierarchy
java.sql.Connection (also extends java.sql.Wrapper)
com.vertica.jdbc.VerticaConnection
com.vertica.jdbc.kv.VerticaRoutableConnection
- java.sql.Statement (also extends java.sql.Wrapper)
java.sql.PreparedStatement
com.vertica.jdbc.VerticaPreparedStatement
java.sql.Connection (also extends java.lang.AutoCloseable)
com.vertica.jdbc.VerticaConnection
com.vertica.jdbc.kv.VerticaRoutableConnection
- java.sql.Statement (also extends java.lang.AutoCloseable)
java.sql.PreparedStatement
com.vertica.jdbc.VerticaPreparedStatement
Enum Hierarchy
java.lang.Enum (implements java.lang.Comparable, java.io.Serializable)
com.vertica.jdbc.kv.VGet.SortOrder
3 - com.vertica.jdbc
-
| Interface |
Description |
| VerticaConnection |
This interface defines the public Vertica Analytic Database extensions to java.sql.Connection. |
| VerticaDatabaseErrorInfo |
Exposes additional information about errors that occur on the database server. |
| VerticaPreparedStatement |
This interface defines the public Vertica Analytic Database extensions to java.sql.Statement. |
| VerticaStatement |
This interface defines the public Vertica Analytic Database extensions to java.sql.Statement. |
-
| Class |
Description |
| DataSource |
|
| Driver |
|
| VerticaCopyStream |
A bulk loading utility that sends COPY FROM LOCAL STDIN data from a JDBC client to the Vertica database. |
| VerticaDayTimeInterval |
The JDBC representation of the Vertica INTERVAL DAY TO SECOND type. |
| VerticaTypes |
This class defines Vertica identifiers for data types Vertica supports but which are not represented in java.sql.types. |
| VerticaYearMonthInterval |
The JDBC representation of the Vertica INTERVAL YEAR TO MONTH type. |
4 - com.vertica.jdbc Class Hierarchy
Class Hierarchy
com.vertica.jdbc.common.BaseConnectionFactory
com.vertica.jdbc.common.AbstractDataSource (implements javax.sql.ConnectionPoolDataSource, javax.sql.DataSource)
com.vertica.jdbc.hybrid.HybridAbstractDataSource
com.vertica.jdbc.DataSource (implements javax.sql.DataSource)
- com.vertica.jdbc.common.AbstractDriver (implements java.sql.Driver)
com.vertica.jdbc.hybrid.HybridAbstractDriver
com.vertica.jdbc.Driver
- com.vertica.dsi.dataengine.utilities.DSIMonthSpan (implements java.lang.Cloneable)
com.vertica.jdbc.VerticaYearMonthInterval (implements java.lang.Cloneable)
- com.vertica.dsi.dataengine.utilities.DSITimeSpan (implements java.lang.Cloneable)
com.vertica.jdbc.VerticaDayTimeInterval (implements java.lang.Cloneable)
Interface Hierarchy
java.sql.Connection (also extends java.sql.Wrapper)
com.vertica.jdbc.VerticaConnection
- java.sql.Statement (also extends java.sql.Wrapper)
java.sql.PreparedStatement
com.vertica.jdbc.VerticaPreparedStatement
java.sql.Connection (also extends java.lang.AutoCloseable)
com.vertica.jdbc.VerticaConnection
- java.sql.Statement (also extends java.lang.AutoCloseable)
java.sql.PreparedStatement
com.vertica.jdbc.VerticaPreparedStatement
5 - com.vertica.jdbc.kv
-
| Interface |
Description |
| VerticaRoutableConnection |
Deprecated This feature is likely to stop working in a future release and to be removed as a result. |
| VerticaRoutableExecutor |
Deprecated This feature is likely to stop working in a future release and to be removed as a result. |
| VGet |
Deprecated This feature is likely to stop working in a future release and to be removed as a result. |
-
| Class |
Description |
| VHash |
Deprecated This feature is likely to stop working in a future release and to be removed as a result. |
-
| Enum |
Description |
| VGet.SortOrder |
Describes the ordering of result data. |
6 - com.vertica.jdbc.kv Class Hierarchy
Class Hierarchy
com.vertica.jdbc.kv.VHash
Interface Hierarchy
java.sql.Connection (also extends java.sql.Wrapper)
com.vertica.jdbc.VerticaConnection
com.vertica.jdbc.kv.VerticaRoutableConnection
java.sql.Connection (also extends java.lang.AutoCloseable)
com.vertica.jdbc.VerticaConnection
com.vertica.jdbc.kv.VerticaRoutableConnection
Enum Hierarchy
java.lang.Enum (implements java.lang.Comparable, java.io.Serializable)
com.vertica.jdbc.kv.VGet.SortOrder
7 - DataSource
-
java.lang.Object
-
com.vertica.jdbc.common.BaseConnectionFactory
-
com.vertica.jdbc.common.AbstractDataSource
-
com.vertica.jdbc.hybrid.HybridAbstractDataSource
-
com.vertica.jdbc.DataSource
-
All Implemented Interfaces:
java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource
public class DataSource
extends com.vertica.jdbc.hybrid.HybridAbstractDataSource
implements javax.sql.DataSource
Field Summary
Fields inherited from class com.vertica.jdbc.common.BaseConnectionFactory
CONNECTION_LOCALE_KEY, s_Messages, URL_SEPARATOR
Constructor Summary
| Constructor and Description |
| DataSource() |
Method Summary
| Modifier and Type |
Method and Description |
| boolean |
areBatchInsertsDirect() Get if batch inserts are direct for the data source. |
| java.lang.String |
getBackupServerNode() Get list of backup server nodes. |
| boolean |
getBinaryTransfer() Get whether or not connection uses binary transfer |
| java.lang.String |
getConnSettings() Returns the session initialization sql that will run when a connection is established. |
| java.lang.String |
getDatabase() Get the database for the data source. |
| boolean |
getDisableCopyLocal() Gets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled. |
| boolean |
getEnableRoutableQueries() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| boolean |
getFailOnMultiNodePlans() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| java.lang.String |
getHost() Get the host for the data source. |
| java.lang.String |
getHostNameVerifier() Get if TLS Mode for the data source. |
| java.lang.String |
getJAASConfigName() Gets the name of the JAAS configuration entry that will the driver will use when performing GSS authentication. |
| java.lang.String |
getKerberosHostName() Gets the host name portion of the kerberos service principal that identifies the Vertica server. |
| java.lang.String |
getKerberosServiceName() Gets the service name portion of the kerberos service principal that identifies the Vertica server. |
| java.lang.String |
getKeyStorePassword() Gets the password for the keystore file. |
| java.lang.String |
getKeyStorePath() Gets the path to the keystore file, or "" if not specified. |
| java.lang.String |
getLocale() Get the locale for the data source. |
| java.lang.String |
getLogDirectory() Gets the directory used to store log files |
| int |
getLoginNetworkTimeout() Get the LoginNetworkTimeout for the data source. |
| int |
getLoginNodeTimeout() Get the LoginNodeTimeout for the data source. |
| int |
getLoginTimeout() Get the login timeout for the data source. |
| com.vertica.support.LogLevel |
getLogLevel() Gets current level of logging |
| java.lang.String |
getLogNameSpace() Gets package that logging is restricted to |
| boolean |
getMarsEnabled() |
| int |
getMaxPooledConnections() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| int |
getMaxPooledConnectionsPerNode() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| int |
getMaxPooledConnectionUses() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| int |
getMetadataCacheLifetime() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| int |
getNetworkTimeout() Gets the current network timeout value. |
| int |
getNodeDownWaitTime() Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| java.lang.String |
getOAuthAccessToken() Gets the access token used for OAuth authentication. |
| java.lang.String |
getOAuthClientId() Gets the client ID used for OAuth authentication. |
| java.lang.String |
getOAuthClientSecret() Gets the client secret used for OAuth authentication. |
| java.lang.String |
getOAuthDiscoveryUrl() Gets the discovery url used to fetch the OAuth token endpoint. |
| java.lang.String |
getOAuthRefreshToken() Gets the refresh token used for OAuth authentication. |
| java.lang.String |
getOAuthScope() Gets the scope of the access request used for OAuth token refresh. |
| java.lang.String |
getOAuthTokenUrl() Gets the token url used for OAuth authentication. |
| java.util.logging.Logger |
getParentLogger() Get parent Logger of all the Loggers used by this data source. |
| short |
getPort() Get the port for the data source. |
| int |
getPortInt() Get the port for the data source as an inteter. |
| java.lang.String |
getPreferredAddressFamily() Gets the preferred address family type to be used when resolving hostnames. |
| long |
getResultBufferSize() Get the maximum size of the client side ResultSet cache for the data source. |
| java.lang.String |
getSearchPath() Get the schema search path for this data source. |
| java.lang.String |
getSessionLabel() Get the session label for the data source. |
| java.lang.String |
getSessionTimezone() Get the session timezone for the data source. |
| java.lang.String |
getSocketFactoryName() Get the custom socket factory name for the data source. |
| java.lang.String |
getSSLSocketFactoryName() Get the custom SSL socket factory name for the data source. |
| boolean |
getStreamingBatchInsert() Gets the value of the connection setting that determines whether the streaming or non-streaming batch insert model is used. |
| java.lang.String |
getTLSMode() Get TLS Mode for the data source. |
| int |
getTransactionIsolation() Get the transaction isolation for the data source. |
| java.lang.String |
getTrustStorePassword() Gets the password for the truststore file. |
| java.lang.String |
getTrustStorePath() Gets the path to the truststore file, or "" if not specified. |
| java.lang.String |
getUser() Get current user |
| boolean |
isAutoCommitOnByDefault() Get if autocommit is enabled by default for the data source. |
| boolean |
isReadOnly() Get if the data source is read only. |
| boolean |
isSslEnabled() Deprecated. getTLSMode method provide finer information. |
| boolean |
isWrapperFor(java.lang.Class iface) |
| void |
setAutoCommitOnByDefault(boolean isAutoCommit) Set if autocommit is enabled by default for the data source. |
| void |
setBackupServerNode(java.lang.String backupServerNode) Sets the list of backup server nodes for this data source. |
| void |
setBatchInsertsDirect(boolean isDirect) Deprecated. This method has been deprecated. WOS and moveout operations are no longer supported. All connections use direct batch insert. |
| void |
setBinaryTransfer(boolean enabled) Sets the flag that indicates whether or not to use binary transfer |
| void |
setConnectionLoadBalance(boolean useConnectionLoadBalance) Sets the flag that indicates whether or not to use native load balancing. |
| void |
setConnSettings(java.lang.String sql) ConnSettings are sql statements that the driver will execute when a connection is made. |
| void |
setDatabase(java.lang.String database) Set the database for the data source. |
| void |
setDisableCopyLocal(boolean disabled) Sets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled. |
| void |
setEnableRoutableQueries(boolean enabled) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setFailOnMultiNodePlans(boolean enabled) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setHost(java.lang.String host) Set the host for the data source. |
| void |
setHostNameVerifier(java.lang.String hvn) Set user defined HostnameVerifier. |
| void |
setJAASConfigName(java.lang.String name) Sets the name of the JAAS configuration entry that will be used when performing GSS-Kerberos authentication. |
| void |
setKerberosHostName(java.lang.String name) Sets the host name portion of the kerberos service principal that identifies the Vertica server. |
| void |
setKerberosServiceName(java.lang.String name) Sets the service name portion of the kerberos service principal that identifies the Vertica server. |
| void |
setKeyStorePassword(java.lang.String paramString) Sets the password protecting the keystore file. |
| void |
setKeyStorePath(java.lang.String paramString) Sets the path to a keystore file (typically in .jks format) to be used for TLS connections. |
| void |
setLocale(java.lang.String locale) Set the locale for the data source. |
| void |
setLogDirectory(java.lang.String paramString) Sets the directory used to store log files. |
| void |
setLoginNetworkTimeout(int timeout) Set the loginNetworkTimeout for the data source. |
| void |
setLoginNodeTimeout(int timeout) Set the loginNodeTimeout for the data source. |
| void |
setLoginTimeout(int loginTimeout) Set the login timeout for the data source. |
| void |
setLogLevel(java.lang.String paramString) Sets the log level Valid values: OFF (no logging) INFO WARNING TRACE ERROR DEBUG (most verbose) An invalid value will set log level to OFF |
| void |
setLogNameSpace(java.lang.String value) Sets the package that logging is restricted to. |
| void |
setMarsEnabled(boolean value) |
| void |
setMaxPooledConnections(int max) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setMaxPooledConnectionsPerNode(int max) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setMaxPooledConnectionUses(int uses) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setMetadataCacheLifetime(int lifetime) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setNetworkTimeout(int milliseconds) Sets the network timeout. |
| void |
setNodeDownWaitTime(int waitTime) Deprecated. This feature is likely to stop working in a future release and to be removed as a result. |
| void |
setOAuthAccessToken(java.lang.String accessToken) Sets the access token used for OAuth authentication. |
| void |
setOAuthClientId(java.lang.String clientId) Sets the client ID used for OAuth authentication. |
| void |
setOAuthClientSecret(java.lang.String clientSecret) Sets the client secret used for OAuth authentication. |
| void |
setOAuthDiscoveryUrl(java.lang.String discoveryUrl) Sets the discovery url used to fetch the OAuth token endpoint. |
| void |
setOAuthRefreshToken(java.lang.String refreshToken) Sets the refresh token used for OAuth authentication. |
| void |
setOAuthScope(java.lang.String scope) Sets the scope of the access request used for OAuth token refresh. |
| void |
setOAuthTokenUrl(java.lang.String tokenUrl) Sets the token url used for OAuth authentication. |
| void |
setPort(int port) Set the port for the data source as an integer. |
| void |
setPort(short port) Set the port for the data source. |
| void |
setPreferredAddressFamily(java.lang.String value) Sets the address family type to prefer when the driver resolves hostnames. |
| void |
setReadOnly(boolean readOnly) Set if the data source is read only. |
| void |
setResultBufferSize(long size) Set the maximum amount of data to cache in bytes when streaming ResultSet data. |
| void |
setSearchPath(java.lang.String searchPath) Sets the schema search path for this data source. |
| void |
setSessionLabel(java.lang.String label) Set the session label for the data source. |
| void |
setSessionTimezone(java.lang.String tz) |
| void |
setSocketFactoryName(java.lang.String socketFactoryName) Set the custom socket factory name for the data source. |
| void |
setSslEnabled(boolean isSslEnabled) Deprecated. setTLSMode provides finer grained control over the TLS connection process |
| void |
setSSLSocketFactoryName(java.lang.String sslSocketFactoryName) Set the custom SSL socket factory name for the data source. |
| void |
setStreamingBatchInsert(boolean enabled) Sets the value of the connection setting that determines whether the streaming or non-streaming batch insert model is used. |
| void |
setThreePartNaming(boolean useThreePartNaming) Set three part naming for the data source. |
| void |
setTLSMode(java.lang.String mode) Set TLS Mode for data source. |
| void |
setTrustStorePassword(java.lang.String paramString) Sets the password protecting the truststore file. |
| void |
setTrustStorePath(java.lang.String paramString) Sets the path to a truststore file (typically in .jks format) to be used for TLS connections. |
| void |
setUser(java.lang.String user) Sets the current user |
| T |
unwrap(java.lang.Class iface) |
| boolean |
useConnectionLoadBalance() Get whether or not connection load balancing is in use. |
| boolean |
useThreePartNaming() Get if three-part naming is used for the data source. |
Methods inherited from class com.vertica.jdbc.common.AbstractDataSource
getConnection, getConnection, getCustomProperty, getLogWriter, getPassword, getPooledConnection, getPooledConnection, getUserID, initialize, removeCustomProperty, setCustomProperty, setLogWriter, setPassword, setURL, setUserID
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.sql.DataSource
getConnection, getConnection
Methods inherited from interface javax.sql.CommonDataSource
getLogWriter, setLogWriter
Constructor Detail
DataSource
public DataSource()
Method Detail
areBatchInsertsDirect
public boolean areBatchInsertsDirect()
Get if batch inserts are direct for the data source.
Returns
true if batch inserts go directly into the ROS for the data source.
getDatabase
public java.lang.String getDatabase()
Get the database for the data source.
Returns
The database for the data source.
getHost
public java.lang.String getHost()
Get the host for the data source.
Returns
The host for the data source.
getLocale
public java.lang.String getLocale()
Get the locale for the data source.
Returns
The locale for the data source.
getSessionTimezone
public java.lang.String getSessionTimezone()
Get the session timezone for the data source.
Returns
A string representing the timezone
getLoginTimeout
public int getLoginTimeout()
Get the login timeout for the data source.
Specified by
getLoginTimeout in interface javax.sql.CommonDataSource
Overrides
getLoginTimeout in class com.vertica.jdbc.common.AbstractDataSource
Returns
The login timeout for the data source.
getLoginNetworkTimeout
public int getLoginNetworkTimeout()
Get the LoginNetworkTimeout for the data source.
Returns
The LoginNetworkTimeout for the data source.
getLoginNodeTimeout
public int getLoginNodeTimeout()
Get the LoginNodeTimeout for the data source.
Returns
The LoginNodeTimeout for the data source.
getSocketFactoryName
public java.lang.String getSocketFactoryName()
Get the custom socket factory name for the data source.
Returns
The custom socket factory name for the data source.
getSSLSocketFactoryName
public java.lang.String getSSLSocketFactoryName()
Get the custom SSL socket factory name for the data source.
Returns
The custom socket factory name for the data source.
getResultBufferSize
public long getResultBufferSize()
Get the maximum size of the client side ResultSet cache for the data source.
Returns
The maximum size of the client side ResultSet cache for the data source.
getPort
public short getPort()
Get the port for the data source.
Returns
The port for the data source.
getPortInt
public int getPortInt()
Get the port for the data source as an inteter.
Returns
The port for the data source.
isReadOnly
public boolean isReadOnly()
Get if the data source is read only.
Returns
true if the data source is read only.
getSearchPath
public java.lang.String getSearchPath()
Get the schema search path for this data source.
Returns
A comma separated list of schemas.
getSessionLabel
public java.lang.String getSessionLabel()
Get the session label for the data source.
Returns
The session label for the data source.
getTransactionIsolation
public int getTransactionIsolation()
Get the transaction isolation for the data source.
Returns
The transaction isolation for the data source.
isAutoCommitOnByDefault
public boolean isAutoCommitOnByDefault()
Get if autocommit is enabled by default for the data source.
Returns
true if autocommit is enabled by default for the data source.
isSslEnabled
public boolean isSslEnabled()
Deprecated. getTLSMode method provide finer information.
Get if SSL is enabled for the data source.
Returns
true if SSL is enabled (>= Require in TLSMode) for the data source.
getTLSMode
public java.lang.String getTLSMode()
Get TLS Mode for the data source.
Returns
Currently support Disable, Require, Verify-ca and Verify-full.
getHostNameVerifier
public java.lang.String getHostNameVerifier()
Get if TLS Mode for the data source.
Returns
Hostname verifer in use, default value is com.vertica.security.VerticaHostnameVerifier.
useConnectionLoadBalance
public boolean useConnectionLoadBalance()
Get whether or not connection load balancing is in use.
Returns
true if connection load balancing is enabled for the data source.
getBackupServerNode
public java.lang.String getBackupServerNode()
Get list of backup server nodes.
Returns
Comma-separated list of backup server nodes for this data source.
getUser
public java.lang.String getUser()
Get current user
Returns
the current user
getParentLogger
public java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
Get parent Logger of all the Loggers used by this data source.
Specified by
getParentLogger in interface javax.sql.CommonDataSource
Returns
the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source
Throws:
java.sql.SQLFeatureNotSupportedException
setAutoCommitOnByDefault
public void setAutoCommitOnByDefault(boolean isAutoCommit)
Set if autocommit is enabled by default for the data source.
Parameters:isAutoCommit - true if autocommit is enabled by default for the
data source.
setBatchInsertsDirect
@Deprecated
public void setBatchInsertsDirect(boolean isDirect)
Deprecated. This method has been deprecated. WOS and moveout operations are no longer supported.
All connections use direct batch insert.
Set if batch inserts should go directly to the ROS for the data source.
Parameters:isDirect - ignored
setDatabase
public void setDatabase(java.lang.String database)
Set the database for the data source.
Parameters:database - The database for the data source.
setHost
public void setHost(java.lang.String host)
Set the host for the data source.
Parameters:host - The host for the data source.
setLocale
public void setLocale(java.lang.String locale)
Set the locale for the data source.
Parameters:locale - The locale for the data source.
setSessionTimezone
public void setSessionTimezone(java.lang.String tz)
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
Set the login timeout for the data source.
Specified by
setLoginTimeout in interface javax.sql.CommonDataSource
Overrides
setLoginTimeout in class com.vertica.jdbc.common.AbstractDataSource
Parameters:loginTimeout - The login timeout for the data source.
setLoginNetworkTimeout
public void setLoginNetworkTimeout(int timeout)
Set the loginNetworkTimeout for the data source.
Parameters:timeout - The loginNetworkTimeout for the data source.
setLoginNodeTimeout
public void setLoginNodeTimeout(int timeout)
Set the loginNodeTimeout for the data source.
Parameters:timeout - The loginNodeTimeout for the data source.
setSSLSocketFactoryName
public void setSSLSocketFactoryName(java.lang.String sslSocketFactoryName)
Set the custom SSL socket factory name for the data source. If set, this must be the name of
a class that extends javax.net.ssl.SSLSocketFactory with a zero-argument constructor that is
available on the class path.
Typically the SSLSocketFactory will act as a wrapper for a raw socket,
performing SSL/TLS encryption prior to forwarding the bytes to
the underlying socket.
If also using a cusom socket factory (via setSocketFactoryName(String socketFactoryName)), then that
factory will create the raw socket and this factory will be passed that raw socket for I/O.
Parameters:sslSocketFactoryName - The custom SSL socket factory name for the data source.
setSocketFactoryName
public void setSocketFactoryName(java.lang.String socketFactoryName)
Set the custom socket factory name for the data source. If set, this must be the name of
a class that extends javax.net.SocketFactory with a zero-argument constructor that is
available on the class path.
Parameters:socketFactoryName - The custom socket factory name for the data source.
setResultBufferSize
public void setResultBufferSize(long size)
Set the maximum amount of data to cache in bytes when streaming ResultSet data.
Parameters:size - A number of bytes.
setPort
public void setPort(int port)
Set the port for the data source as an integer.
Parameters:port - The port for the data source.
setPort
public void setPort(short port)
Set the port for the data source.
Parameters:port - The port for the data source.
setReadOnly
public void setReadOnly(boolean readOnly)
Set if the data source is read only.
Parameters:readOnly - true if the data source is read only.
setSessionLabel
public void setSessionLabel(java.lang.String label)
Set the session label for the data source.
Parameters:label - The session label for the data source.
setSslEnabled
public void setSslEnabled(boolean isSslEnabled)
Deprecated. setTLSMode provides finer grained control over the TLS connection process
Set if SSL is enabled for the data source.
Parameters:isSslEnabled - true if SSL is enabled for the data source.
setTLSMode
public void setTLSMode(java.lang.String mode)
Set TLS Mode for data source. value >= Require will enable TLS/SSL.
Parameters:mode - Currently support Disable, Require, Verify-ca and Verify-full.
setHostNameVerifier
public void setHostNameVerifier(java.lang.String hvn)
Set user defined HostnameVerifier.
Only call this function when default hostnameverifier cannot fulfill the requirements.
Parameters:hvn - String value of the customized hostnameverifier class location.
setThreePartNaming
public void setThreePartNaming(boolean useThreePartNaming)
Set three part naming for the data source. When enabled, metadata ResultSets containing a catalog column will report the database name as the catalog, rather than NULL.
Parameters:useThreePartNaming - true if three-part naming is enabled for the data
source.
setSearchPath
public void setSearchPath(java.lang.String searchPath)
Sets the schema search path for this data source.
Parameters:searchPath - A comma separated list of schema names.
setBackupServerNode
public void setBackupServerNode(java.lang.String backupServerNode)
Sets the list of backup server nodes for this data source.
Parameters:backupServerNode - A comma separated list of vertica servers (host:port[,host:port...])
setUser
public void setUser(java.lang.String user)
Sets the current user
Parameters:user - current user
setConnectionLoadBalance
public void setConnectionLoadBalance(boolean useConnectionLoadBalance)
Sets the flag that indicates whether or not to use native load balancing.
Parameters:useConnectionLoadBalance - true if native load balancing is enabled for the data
source.
useThreePartNaming
public boolean useThreePartNaming()
Get if three-part naming is used for the data source. When enabled, metadata ResultSets containing a catalog column will report the database name as the catalog, rather than NULL.
Returns
true if three-part naming is enabled for the data source.
getJAASConfigName
public java.lang.String getJAASConfigName()
Gets the name of the JAAS configuration entry that will the driver will use when performing GSS authentication.
Returns
A JAAS configuration name
setJAASConfigName
public void setJAASConfigName(java.lang.String name)
Sets the name of the JAAS configuration entry that will be used when performing GSS-Kerberos authentication.
The driver relies on JAAS to acquire a kerberos ticket-granting-ticket when the database server requests that the client
uses GSS authentication. The JAAS configuration identified by this name can be used to customize this process.
Parameters:name - The name of a configuration entry in a JAAS configuration file.
getKerberosServiceName
public java.lang.String getKerberosServiceName()
Gets the service name portion of the kerberos service principal that identifies the Vertica server.
Returns
The Vertica server's kerberos service name.
setKerberosServiceName
public void setKerberosServiceName(java.lang.String name)
Sets the service name portion of the kerberos service principal that identifies the Vertica server.
When the Vertica server requests that the client uses GSS authentication, the client uses this name to
request a kerberos service ticket. The value of this property should match the database's
KerberosServiceName config parameter.
Parameters:name - The Vertica server's kerberos service name.
getKerberosHostName
public java.lang.String getKerberosHostName()
Gets the host name portion of the kerberos service principal that identifies the Vertica server.
Returns
The Vertica server's kerberos host name.
setKerberosHostName
public void setKerberosHostName(java.lang.String name)
Sets the host name portion of the kerberos service principal that identifies the Vertica server.
When the Vertica server requests that the client uses GSS authentication, the client uses this name to
request a kerberos service ticket. The value of this property should match the database's
KerberosHostName config parameter.
Parameters:name - The Vertica server's kerberos host name.
getOAuthAccessToken
public java.lang.String getOAuthAccessToken()
Gets the access token used for OAuth authentication.
Returns
The client's access token.
setOAuthAccessToken
public void setOAuthAccessToken(java.lang.String accessToken)
Sets the access token used for OAuth authentication.
Parameters:accessToken - The client's access token.
getOAuthRefreshToken
public java.lang.String getOAuthRefreshToken()
Gets the refresh token used for OAuth authentication.
Returns
The client's refresh token.
setOAuthRefreshToken
public void setOAuthRefreshToken(java.lang.String refreshToken)
Sets the refresh token used for OAuth authentication.
Parameters:refreshToken - The client's refresh token.
getOAuthTokenUrl
public java.lang.String getOAuthTokenUrl()
Gets the token url used for OAuth authentication.
Returns
The client's token url.
setOAuthTokenUrl
public void setOAuthTokenUrl(java.lang.String tokenUrl)
Sets the token url used for OAuth authentication.
Parameters:tokenUrl - The client's token url.
getOAuthClientId
public java.lang.String getOAuthClientId()
Gets the client ID used for OAuth authentication.
Returns
The client's ID.
setOAuthClientId
public void setOAuthClientId(java.lang.String clientId)
Sets the client ID used for OAuth authentication.
Parameters:clientId - The client's ID.
getOAuthClientSecret
public java.lang.String getOAuthClientSecret()
Gets the client secret used for OAuth authentication.
Returns
The client's secret.
setOAuthClientSecret
public void setOAuthClientSecret(java.lang.String clientSecret)
Sets the client secret used for OAuth authentication.
Parameters:clientSecret - The client's secret.
getOAuthDiscoveryUrl
public java.lang.String getOAuthDiscoveryUrl()
Gets the discovery url used to fetch the OAuth token endpoint.
Returns
The client's discovery url.
setOAuthDiscoveryUrl
public void setOAuthDiscoveryUrl(java.lang.String discoveryUrl)
Sets the discovery url used to fetch the OAuth token endpoint.
Parameters:discoveryUrl - The client's discovery url.
getOAuthScope
public java.lang.String getOAuthScope()
Gets the scope of the access request used for OAuth token refresh.
Returns
The scope of the access request used for OAuth token refresh.
setOAuthScope
public void setOAuthScope(java.lang.String scope)
Sets the scope of the access request used for OAuth token refresh.
Parameters:scope - The scope of the access request used for OAuth token refresh.
getStreamingBatchInsert
public boolean getStreamingBatchInsert()
Gets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
Returns
true if batches are stored in memory, false if they are sent to the server immediately
setStreamingBatchInsert
public void setStreamingBatchInsert(boolean enabled)
Sets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
Parameters:enabled - True to store batches in memory, false to send them to the server immediately
getDisableCopyLocal
public boolean getDisableCopyLocal()
Gets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
Returns
true if file-based COPY LOCAL operations are disabled
setDisableCopyLocal
public void setDisableCopyLocal(boolean disabled)
Sets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
Parameters:disabled - True to disable file-based COPY LOCAL operations
getBinaryTransfer
public boolean getBinaryTransfer()
Get whether or not connection uses binary transfer
Returns
true if binary transfer is enabled
setBinaryTransfer
public void setBinaryTransfer(boolean enabled)
Sets the flag that indicates whether or not to use binary transfer
Parameters:enabled - True if binary transfer should be enabled
setConnSettings
public void setConnSettings(java.lang.String sql)
ConnSettings are sql statements that the driver will execute when a connection is made.
This is typically used to initialize session variables automatically with each connection.
Parameters:sql - Semicolon-delimited sql statements that run when a connection is established.
getConnSettings
public java.lang.String getConnSettings()
Returns the session initialization sql that will run when a connection is established.
If no ConnSettings was specified, "" is returned.
Returns
Semicolon-delimited sql thats that run when a connection is established.
getEnableRoutableQueries
@Deprecated
public boolean getEnableRoutableQueries()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Get if VerticaRoutableConnections are returned by the data source.
Returns
true if VerticaRoutableConnections are returned.
setEnableRoutableQueries
@Deprecated
public void setEnableRoutableQueries(boolean enabled)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Set if VerticaRoutableConnections are returned by the data source.
Parameters:enabled - true to enable VerticaRoutableConnections
getFailOnMultiNodePlans
@Deprecated
public boolean getFailOnMultiNodePlans()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Get if non-local plans are allowed in VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
true if non-local plans are allowed.
setFailOnMultiNodePlans
@Deprecated
public void setFailOnMultiNodePlans(boolean enabled)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Get if non-local plans are allowed in VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:enabled - true to allow non-local plans, false to disable.
setMaxPooledConnectionUses
@Deprecated
public void setMaxPooledConnectionUses(int uses)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Set the maximum number times to use a pooled connection before closing it.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:uses - The maximum number of times to use a pooled connection.
getMaxPooledConnectionUses
@Deprecated
public int getMaxPooledConnectionUses()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Gets the maximum number times to use a pooled connection before closing it.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
The maximum number of times to use a pooled connection.
setMaxPooledConnections
@Deprecated
public void setMaxPooledConnections(int max)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Set the maximum number of pooled connections.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:max - The maximum number of pooled connections allowed open at a time.
getMaxPooledConnections
@Deprecated
public int getMaxPooledConnections()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Gets the maximum number of pooled connections.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
The maximum number pooled connections allowed open at a time.
setMaxPooledConnectionsPerNode
@Deprecated
public void setMaxPooledConnectionsPerNode(int max)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Set the maximum number of pooled connections per node.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:max - The maximum number of pooled connections to a single node allowed open at a time.
getMaxPooledConnectionsPerNode
@Deprecated
public int getMaxPooledConnectionsPerNode()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Gets the maximum number of pooled connections per node.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
The maximum number pooled connections to a single node allowed at a time.
@Deprecated
public int getMetadataCacheLifetime()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Gets the number of seconds to reuse table and projection metadata during VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
Amount of time in seconds to keep metadata cached.
@Deprecated
public void setMetadataCacheLifetime(int lifetime)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Sets the number of seconds to reuse table and projection metadata during VGet operations.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:lifetime - Amount of time in seconds to keep metadata cached.
getNodeDownWaitTime
@Deprecated
public int getNodeDownWaitTime()
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Gets the number of seconds to wait before attempting a new connection to a node after detecting a connection failure.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Returns
Amount of time in seconds to wait before attempting another connection to a node.
setNodeDownWaitTime
@Deprecated
public void setNodeDownWaitTime(int waitTime)
Deprecated. This feature is likely to stop working in a future release and to be removed as a result.
Sets the number of seconds to wait before attempting a new connection to a node after detecting a connection failure.
Only has an effect on VerticaRoutableConnections, i.e. when getEnableRoutableQueries() returns true.
Parameters:waitTime - Amount of time in seconds to wait before attempting another connection to a node.
setPreferredAddressFamily
public void setPreferredAddressFamily(java.lang.String value)
Sets the address family type to prefer when the driver resolves hostnames.
When set to to "ipv6" the driver will attempt to use IPv6 type AAAA DNS records before IPv4 type A DNS records.
When set to "ipv4", the driver will use IPv4 type A DNS records first.
When set to "none" (the default), the driver will take no preference, and instead use the records in the order returned by the JRE.
Parameters:value - The preferred address family to use. One of "ipv6", "ipv4" or "none"
getPreferredAddressFamily
public java.lang.String getPreferredAddressFamily()
Gets the preferred address family type to be used when resolving hostnames.
Returns
The preferred address family type for the data source.
setMarsEnabled
public void setMarsEnabled(boolean value)
getMarsEnabled
public boolean getMarsEnabled()
getLogNameSpace
public java.lang.String getLogNameSpace()
Gets package that logging is restricted to
Returns
Namespace for logging
setNetworkTimeout
public void setNetworkTimeout(int milliseconds)
Sets the network timeout.
Valid values:
≥= 0
Parameters:
milliseconds - The network timeout value for the current connection in milliseconds
getNetworkTimeout
public int getNetworkTimeout()
Gets the current network timeout value.
Returns
Network timeout value in milliseconds
setLogNameSpace
public void setLogNameSpace(java.lang.String value)
Sets the package that logging is restricted to.
Valid values:
com.vertica (all messages generated by the JDBC driver)
-
com.vertica.jdbc (all messages generated by the top-level JDBC API)
-
com.vertica.jdbc.core (connection and statement settings)
-
com.vertica.jdbc.io (client/server protocol messages)
-
com.vertica.jdbc.util (miscellaneous utilities)
-
com.vertica.jdbc.dataengine (query execution and result set iteration).
Parameters:
value - Namespace for logging
setLogLevel
public void setLogLevel(java.lang.String paramString)
Sets the log level
Valid values:
OFF (no logging)
-
INFO
-
WARNING
-
TRACE
-
ERROR
-
DEBUG (most verbose)
An invalid value will set log level to OFF
Overrides
setLogLevel in class com.vertica.jdbc.common.AbstractDataSource
Parameters:
paramString - String indicating the log level. Can also be numbers 1 to 6
getLogLevel
public com.vertica.support.LogLevel getLogLevel()
Gets current level of logging
Overrides
getLogLevel in class com.vertica.jdbc.common.AbstractDataSource
Returns
The level of logging
setLogDirectory
public void setLogDirectory(java.lang.String paramString)
Sets the directory used to store log files. The directory will be created if it does not exist.
Overrides
setLogDirectory in class com.vertica.jdbc.common.AbstractDataSource
Parameters:paramString - String indicating the directory to log to
getLogDirectory
public java.lang.String getLogDirectory()
Gets the directory used to store log files
Overrides
getLogDirectory in class com.vertica.jdbc.common.AbstractDataSource
Returns
The log directory
setKeyStorePath
public void setKeyStorePath(java.lang.String paramString)
Sets the path to a keystore file (typically in .jks format) to be used for TLS connections.
If not specified, the JVM-global keystore is used.
Parameters:paramString - String with a path to a keystore file
getKeyStorePath
public java.lang.String getKeyStorePath()
Gets the path to the keystore file, or "" if not specified.
Returns
The path to the keystore file
setTrustStorePath
public void setTrustStorePath(java.lang.String paramString)
Sets the path to a truststore file (typically in .jks format) to be used for TLS connections.
If not specified, the JVM-global truststore is used.
Parameters:paramString - String with a path to a truststore file
getTrustStorePath
public java.lang.String getTrustStorePath()
Gets the path to the truststore file, or "" if not specified.
Returns
The path to the truststore file
setTrustStorePassword
public void setTrustStorePassword(java.lang.String paramString)
Sets the password protecting the truststore file. Only used if a custom truststore path is specified.
Parameters:paramString - The password to the truststore file
getTrustStorePassword
public java.lang.String getTrustStorePassword()
Gets the password for the truststore file.
Returns
The password for the truststore file.
setKeyStorePassword
public void setKeyStorePassword(java.lang.String paramString)
Sets the password protecting the keystore file. Only used if a custom keystore path is specified.
If both the keystore and the keys within the keystore are password protected, they must use the
same password specified here.
Parameters:paramString - The password to the keystore file
getKeyStorePassword
public java.lang.String getKeyStorePassword()
Gets the password for the keystore file.
Returns
The password for the keystore file.
unwrap
public T unwrap(java.lang.Class iface)
throws java.sql.SQLException
Specified by
unwrap in interface java.sql.Wrapper
Overrides
unwrap in class com.vertica.jdbc.common.AbstractDataSource
Throws:
java.sql.SQLException
isWrapperFor
public boolean isWrapperFor(java.lang.Class iface)
throws java.sql.SQLException
Specified by
isWrapperFor in interface java.sql.Wrapper
Overrides
isWrapperFor in class com.vertica.jdbc.common.AbstractDataSource
Throws:
java.sql.SQLException
8 - Deprecated List
-
| Interface and Description |
| com.vertica.jdbc.kv.VerticaRoutableConnection This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.kv.VerticaRoutableExecutor This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.kv.VGet This feature is likely to stop working in a future release and to be removed as a result. |
-
| Class and Description |
| com.vertica.jdbc.kv.VHash This feature is likely to stop working in a future release and to be removed as a result. |
-
| Field and Description |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_DAY superseded by VerticaTypes.INTERVAL_DAY |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_DAY_TO_HOUR superseded by VerticaTypes.INTERVAL_DAY_TO_HOUR |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_DAY_TO_MINUTE superseded by VerticaTypes.INTERVAL_DAY_TO_MINUTE |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_DAY_TO_SECOND superseded by VerticaTypes.INTERVAL_DAY_TO_SECOND |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_HOUR superseded by VerticaTypes.INTERVAL_HOUR |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_HOUR_TO_MINUTE superseded by VerticaTypes.INTERVAL_HOUR_TO_MINUTE |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_HOUR_TO_SECOND superseded by VerticaTypes.INTERVAL_HOUR_TO_SECOND |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_MINUTE superseded by VerticaTypes.INTERVAL_MINUTE |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_MINUTE_TO_SECOND superseded by VerticaTypes.INTERVAL_MINUTE_TO_SECOND |
| com.vertica.jdbc.VerticaYearMonthInterval.INTERVAL_MONTH superseded by VerticaTypes.INTERVAL_MONTH |
| com.vertica.jdbc.VerticaDayTimeInterval.INTERVAL_SECOND superseded by VerticaTypes.INTERVAL_SECOND |
| com.vertica.jdbc.VerticaYearMonthInterval.INTERVAL_YEAR superseded by VerticaTypes.INTERVAL_YEAR |
| com.vertica.jdbc.VerticaYearMonthInterval.INTERVAL_YEAR_TO_MONTH superseded by VerticaTypes.INTERVAL_YEAR_TO_MONTH |
-
| Method and Description |
| com.vertica.jdbc.DataSource.getEnableRoutableQueries() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getFailOnMultiNodePlans() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getMaxPooledConnections() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getMaxPooledConnectionsPerNode() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getMaxPooledConnectionUses() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getMetadataCacheLifetime() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.getNodeDownWaitTime() This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.isSslEnabled() getTLSMode method provide finer information. |
| com.vertica.jdbc.DataSource.setBatchInsertsDirect(boolean) This method has been deprecated. WOS and moveout operations are no longer supported. All connections use direct batch insert. |
| com.vertica.jdbc.DataSource.setEnableRoutableQueries(boolean) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setFailOnMultiNodePlans(boolean) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setMaxPooledConnections(int) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setMaxPooledConnectionsPerNode(int) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setMaxPooledConnectionUses(int) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setMetadataCacheLifetime(int) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setNodeDownWaitTime(int) This feature is likely to stop working in a future release and to be removed as a result. |
| com.vertica.jdbc.DataSource.setSslEnabled(boolean) setTLSMode provides finer grained control over the TLS connection process |
9 - Driver
-
java.lang.Object
-
com.vertica.jdbc.common.BaseConnectionFactory
-
com.vertica.jdbc.common.AbstractDriver
-
com.vertica.jdbc.hybrid.HybridAbstractDriver
-
com.vertica.jdbc.Driver
-
All Implemented Interfaces:
java.sql.Driver
public class Driver
extends com.vertica.jdbc.hybrid.HybridAbstractDriver
Field Summary
| Modifier and Type |
Field and Description |
| static java.lang.String |
SUBPROTOCOL_NAME The subprotocol is the portion of the connection string that comes after "jdbc:" but before the "://". |
Fields inherited from class com.vertica.jdbc.common.AbstractDriver
URL_PROTOCOL
Fields inherited from class com.vertica.jdbc.common.BaseConnectionFactory
CONNECTION_LOCALE_KEY, s_Messages, URL_SEPARATOR
Constructor Summary
| Constructor and Description |
| Driver() |
Method Summary
| Modifier and Type |
Method and Description |
| java.util.logging.Logger |
getParentLogger() Get parent Logger of all the Loggers used by this data source. |
Methods inherited from class com.vertica.jdbc.hybrid.HybridAbstractDriver
initializeDriver
Methods inherited from class com.vertica.jdbc.common.AbstractDriver
acceptsURL, connect, getErrorMessageComponentName, getMajorVersion, getMinorVersion, getPropertyInfo, initialize, jdbcCompliant, setErrorMessageComponentName
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
SUBPROTOCOL_NAME
public static final java.lang.String SUBPROTOCOL_NAME
The subprotocol is the portion of the connection string
that comes after "jdbc:" but before the "://".
See Also:Constant Field Values
Constructor Detail
Driver
public Driver()
Method Detail
getParentLogger
public java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
Get parent Logger of all the Loggers used by this data source.
Returns
the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source
Throws:
java.sql.SQLFeatureNotSupportedException
10 - Index
A B C D E F G H I P R S T U V
A
addBoolean(boolean) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of boolean value to the chain.
addBooleanNull() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of boolean null value to the chain.
addBytes(byte[]) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of binary value to the chain.
addDate(Date, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Date value to the chain.
addDate(Date, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Date value to the chain.
addDouble(double) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of double value to the chain.
addDoubleNull() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of double null value to the chain.
addLong(long) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of long value to the chain.
addNull() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
Adds hash of null value to the chain.
addNumeric(BigDecimal, int) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of numeric value to the chain
addOutputColumn(String) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Adds an output column to the ResultSet returned by VGet.execute().
addOutputExpression(String) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Adds the result of a free-form SQL expression to the ResultSet returned by VGet.execute().
addPredicate(String, Object) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Adds or updates a column equality predicate.
addPredicateExpression(String) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Adds a free-form SQL predicate to filter results.
addSortColumn(String, VGet.SortOrder) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Adds the specified column to the sort order of the result.
addStream(InputStream) - Method in class com.vertica.jdbc.VerticaCopyStream
Adds a stream to the list of streams to send in the copy statement.
addString(String) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of String value to the chain.
addTime(Time, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Time value to the chain.
addTime(Date, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Time value to the chain.
addTimestamp(long) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Timestamp value expressed as milliseconds since Jan 1, 1970 UTC to the chain.
addTimestamp(Timestamp, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Timestamp value to the chain.
addTimestamp(Date, Calendar) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of Timestamp value to the chain.
addUUID(UUID) - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of UUID value to the chain.
addUUIDNull() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
adds hash of null UUID to the chain.
areBatchInsertsDirect() - Method in class com.vertica.jdbc.DataSource
Get if batch inserts are direct for the data source.
B
beginConsistentRead() - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
All subsequent VGet accesses will read from
a consistent snapshot acquired at the time this method call is made.
C
clearMetadataCache() - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
Clears the cached projection metadata used by all VGets constructed by this connection.
clearOutputs() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Clears out all outputs added with VGet.addOutputColumn(String) and VGet.addOutputExpression(String).
clearPredicates() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Clears out all predicates added with VGet.addPredicate(String, Object) and VGet.addPredicateExpression(String).
clearSortColumns() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Clears out all columns added to the sort by VGet.addSortColumn(String, SortOrder)
clone() - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Returns a deep copy of this VerticaDayTimeInterval.
clone() - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Returns a deep copy of this VerticaYearMonthInterval.
close() - Method in interface com.vertica.jdbc.kv.VerticaRoutableExecutor
Deprecated.
Release resource used by this VerticaRoutableExecutor - close the result set(s)
close() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Releases resources used by this VGet.
com.vertica.jdbc - package com.vertica.jdbc
com.vertica.jdbc.kv - package com.vertica.jdbc.kv
createRoutableExecutor(String, String) - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
Create a KV query executor for a table/projection.
D
DataSource - Class in com.vertica.jdbc
DataSource() - Constructor for class com.vertica.jdbc.DataSource
Driver - Class in com.vertica.jdbc
Driver() - Constructor for class com.vertica.jdbc.Driver
E
endConsistentRead() - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
Stops using snapshot acquired by the last call to VerticaRoutableConnection.beginConsistentRead().
equals(Object) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Returns true if obj is a VerticaDayTimeInterval
and it represents the same span of time as this interval,
regardless of which units are set.
equals(Object) - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Returns true if obj is a VerticaYearMonthInterval
and it represents the same span of time as this interval,
regardless of which units are set.
execute(String, Map) - Method in interface com.vertica.jdbc.kv.VerticaRoutableExecutor
Deprecated.
Execute a query using these segmentation key values arguments.
execute(String, String, Object) - Method in interface com.vertica.jdbc.kv.VerticaRoutableExecutor
Deprecated.
Execute a query using a single column name/value pair as the routing information.
execute() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Fetches the desired results.
execute() - Method in class com.vertica.jdbc.VerticaCopyStream
F
finish() - Method in class com.vertica.jdbc.VerticaCopyStream
Finishes the copy statement.
G
getBackupServerNode() - Method in class com.vertica.jdbc.DataSource
Get list of backup server nodes.
getBinaryTransfer() - Method in class com.vertica.jdbc.DataSource
Get whether or not connection uses binary transfer
getConnSettings() - Method in class com.vertica.jdbc.DataSource
Returns the session initialization sql that will run when a connection is established.
getDatabase() - Method in class com.vertica.jdbc.DataSource
Get the database for the data source.
getDetail() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getDisableCopyLocal() - Method in class com.vertica.jdbc.DataSource
Gets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
getEnableRoutableQueries() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getErrorCode() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getErrorLevel() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
Returns the severity classification for the error.
getFailOnMultiNodePlans() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getHash() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
returns the current hash value
getHint() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getHost() - Method in class com.vertica.jdbc.DataSource
Get the host for the data source.
getHostNameVerifier() - Method in class com.vertica.jdbc.DataSource
Get if TLS Mode for the data source.
getIntervalType() - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Gets the ODBC SQL type identifier for this interval.
getIntervalType() - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Gets the ODBC SQL type identifier for this interval.
getJAASConfigName() - Method in class com.vertica.jdbc.DataSource
Gets the name of the JAAS configuration entry that will the driver will use when performing GSS authentication.
getKerberosHostName() - Method in class com.vertica.jdbc.DataSource
Gets the host name portion of the kerberos service principal that identifies the Vertica server.
getKerberosServiceName() - Method in class com.vertica.jdbc.DataSource
Gets the service name portion of the kerberos service principal that identifies the Vertica server.
getKeyStorePassword() - Method in class com.vertica.jdbc.DataSource
Gets the password for the keystore file.
getKeyStorePath() - Method in class com.vertica.jdbc.DataSource
Gets the path to the keystore file, or "" if not specified.
getLastDatabaseError() - Method in interface com.vertica.jdbc.VerticaConnection
Returns information about the most recent database error that occurred on this connection.
getLocale() - Method in class com.vertica.jdbc.DataSource
Get the locale for the data source.
getLogDirectory() - Method in class com.vertica.jdbc.DataSource
Gets the directory used to store log files
getLoginNetworkTimeout() - Method in class com.vertica.jdbc.DataSource
Get the LoginNetworkTimeout for the data source.
getLoginNodeTimeout() - Method in class com.vertica.jdbc.DataSource
Get the LoginNodeTimeout for the data source.
getLoginTimeout() - Method in class com.vertica.jdbc.DataSource
Get the login timeout for the data source.
getLogLevel() - Method in class com.vertica.jdbc.DataSource
Gets current level of logging
getLogNameSpace() - Method in class com.vertica.jdbc.DataSource
Gets package that logging is restricted to
getMarsEnabled() - Method in class com.vertica.jdbc.DataSource
getMaxPooledConnections() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getMaxPooledConnectionsPerNode() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getMaxPooledConnectionUses() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getMessage() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getMetadataCacheLifetime() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getNetworkTimeout() - Method in class com.vertica.jdbc.DataSource
Gets the current network timeout value.
getNodeDownWaitTime() - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
getNodeFor(Connection, String, String, long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
Returns the name of the node that will be responsible for the provided value in the hash space
for a given projection.
getNodeFor(String, long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
Given a projection's get_projection_segments() output, this
method will return the node that is responsible for the provided hashValue.
getOAuthAccessToken() - Method in class com.vertica.jdbc.DataSource
Gets the access token used for OAuth authentication.
getOAuthClientId() - Method in class com.vertica.jdbc.DataSource
Gets the client ID used for OAuth authentication.
getOAuthClientSecret() - Method in class com.vertica.jdbc.DataSource
Gets the client secret used for OAuth authentication.
getOAuthDiscoveryUrl() - Method in class com.vertica.jdbc.DataSource
Gets the discovery url used to fetch the OAuth token endpoint.
getOAuthRefreshToken() - Method in class com.vertica.jdbc.DataSource
Gets the refresh token used for OAuth authentication.
getOAuthScope() - Method in class com.vertica.jdbc.DataSource
Gets the scope of the access request used for OAuth token refresh.
getOAuthTokenUrl() - Method in class com.vertica.jdbc.DataSource
Gets the token url used for OAuth authentication.
getParentLogger() - Method in class com.vertica.jdbc.DataSource
Get parent Logger of all the Loggers used by this data source.
getParentLogger() - Method in class com.vertica.jdbc.Driver
Get parent Logger of all the Loggers used by this data source.
getPort() - Method in class com.vertica.jdbc.DataSource
Get the port for the data source.
getPortInt() - Method in class com.vertica.jdbc.DataSource
Get the port for the data source as an inteter.
getPosition() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getPrecision() - Method in class com.vertica.jdbc.VerticaDayTimeInterval
getPreferredAddressFamily() - Method in class com.vertica.jdbc.DataSource
Gets the preferred address family type to be used when resolving hostnames.
getProperty(String) - Method in interface com.vertica.jdbc.VerticaConnection
Returns the value of a Vertica specific property on this connection.
getRejects() - Method in class com.vertica.jdbc.VerticaCopyStream
Returns a list of row numbers corresponding to the rows in the input
streams that were rejected by the server.
getResultBufferSize() - Method in class com.vertica.jdbc.DataSource
Get the maximum size of the client side ResultSet cache for the data source.
getRowCount() - Method in class com.vertica.jdbc.VerticaCopyStream
Gets the final row count for the entire copy operation.
getSearchPath() - Method in class com.vertica.jdbc.DataSource
Get the schema search path for this data source.
getSessionLabel() - Method in class com.vertica.jdbc.DataSource
Get the session label for the data source.
getSessionTimezone() - Method in class com.vertica.jdbc.DataSource
Get the session timezone for the data source.
getSocketFactoryName() - Method in class com.vertica.jdbc.DataSource
Get the custom socket factory name for the data source.
getSQLState() - Method in interface com.vertica.jdbc.VerticaDatabaseErrorInfo
getSSLSocketFactoryName() - Method in class com.vertica.jdbc.DataSource
Get the custom SSL socket factory name for the data source.
getStreamingBatchInsert() - Method in class com.vertica.jdbc.DataSource
Gets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
getTLSMode() - Method in class com.vertica.jdbc.DataSource
Get TLS Mode for the data source.
getTransactionIsolation() - Method in class com.vertica.jdbc.DataSource
Get the transaction isolation for the data source.
getTrustStorePassword() - Method in class com.vertica.jdbc.DataSource
Gets the password for the truststore file.
getTrustStorePath() - Method in class com.vertica.jdbc.DataSource
Gets the path to the truststore file, or "" if not specified.
getUser() - Method in class com.vertica.jdbc.DataSource
Get current user
getWarnings() - Method in interface com.vertica.jdbc.kv.VerticaRoutableExecutor
Deprecated.
Get SQLWarning after an VGet.execute() call.
getWarnings() - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Retrieves the first warning reported by calls on this VGet.
H
hashBoolean(boolean) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of boolean value
hashBooleanNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of boolean null value
hashBytes(byte[]) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of a binary value
hashBytesNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of a binary null value
hashBytesNull(long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of a binary null value
hashCode() - Method in class com.vertica.jdbc.VerticaDayTimeInterval
The hash code of an interval is computed first by converting
the value of this interval to a number of nanoseconds.
hashCode() - Method in class com.vertica.jdbc.VerticaYearMonthInterval
The hash code of an interval is calculated first
by converting this interval to a number of months.
hashDate(Date) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of java.util.Date value
hashDate(Date) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of java.sql.Date value
hashDouble(double) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of double value
hashDoubleNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of double null value
hashLong(long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of long value
hashNull(long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of null value.
hashNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
Compute hash of null value
hashNumeric(BigDecimal, int) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of a numeric value
hashString(String) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of String value
hashStringNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of String null value
hashTime(Time) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of Time value
hashTimestamp(long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of Timestamp value expressed in milliseconds since Jan 1, 1970.
hashTimestamp(Timestamp) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of java.sql.Timestamp value
hashUUID(UUID, long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute hash of UUID value.
hashUUIDNull(long) - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute a hash of a null UUID value.
hashUUIDNull() - Static method in class com.vertica.jdbc.kv.VHash
Deprecated.
compute a hash of a null UUID value.
I
INTERVAL_DAY - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_DAY
INTERVAL_DAY - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL DAY interval.
INTERVAL_DAY_TO_HOUR - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_DAY_TO_HOUR
INTERVAL_DAY_TO_HOUR - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL DAY TO HOUR interval.
INTERVAL_DAY_TO_MINUTE - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_DAY_TO_MINUTE
INTERVAL_DAY_TO_MINUTE - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL DAY TO MINUTE interval.
INTERVAL_DAY_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_DAY_TO_SECOND
INTERVAL_DAY_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL DAY TO SECOND interval.
INTERVAL_HOUR - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_HOUR
INTERVAL_HOUR - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL HOUR interval.
INTERVAL_HOUR_TO_MINUTE - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_HOUR_TO_MINUTE
INTERVAL_HOUR_TO_MINUTE - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL HOUR TO MINUTE interval.
INTERVAL_HOUR_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_HOUR_TO_SECOND
INTERVAL_HOUR_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL HOUR TO SECOND interval.
INTERVAL_MINUTE - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_MINUTE
INTERVAL_MINUTE - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL MINUTE interval.
INTERVAL_MINUTE_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_MINUTE_TO_SECOND
INTERVAL_MINUTE_TO_SECOND - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL MINUTE TO SECOND interval.
INTERVAL_MONTH - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL MONTH interval.
INTERVAL_MONTH - Static variable in class com.vertica.jdbc.VerticaYearMonthInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_MONTH
INTERVAL_SECOND - Static variable in class com.vertica.jdbc.VerticaDayTimeInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_SECOND
INTERVAL_SECOND - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL SECOND interval.
INTERVAL_YEAR - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL YEAR interval.
INTERVAL_YEAR - Static variable in class com.vertica.jdbc.VerticaYearMonthInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_YEAR
INTERVAL_YEAR_TO_MONTH - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for an INTERVAL YEAR TO MONTH interval.
INTERVAL_YEAR_TO_MONTH - Static variable in class com.vertica.jdbc.VerticaYearMonthInterval
Deprecated.
superseded by VerticaTypes.INTERVAL_YEAR_TO_MONTH
isAutoCommitOnByDefault() - Method in class com.vertica.jdbc.DataSource
Get if autocommit is enabled by default for the data source.
isDayTimeInterval(int) - Static method in class com.vertica.jdbc.VerticaDayTimeInterval
A helper method to determine if the provided ODBC interval
subtype identifier corresponds to one of the 10 day/time
intervals that this class is capable of representing.
isReadOnly() - Method in class com.vertica.jdbc.DataSource
Get if the data source is read only.
isSslEnabled() - Method in class com.vertica.jdbc.DataSource
Deprecated.
getTLSMode method provide finer information.
isWrapperFor(Class) - Method in class com.vertica.jdbc.DataSource
isYearMonthInterval(int) - Static method in class com.vertica.jdbc.VerticaYearMonthInterval
A helper method to determine if the provided ODBC interval
subtype identifier corresponds to one of the 3 year/month
intervals that this class is capable of representing.
P
prepareGet(String, String) - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
Creates a VGet for the given table or projection.
R
reset() - Method in class com.vertica.jdbc.kv.VHash
Deprecated.
resets hash value for next chain.
S
setAutoCommitOnByDefault(boolean) - Method in class com.vertica.jdbc.DataSource
Set if autocommit is enabled by default for the data source.
setBackupServerNode(String) - Method in class com.vertica.jdbc.DataSource
Sets the list of backup server nodes for this data source.
setBatchInsertsDirect(boolean) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This method has been deprecated. WOS and moveout operations are no longer supported.
All connections use direct batch insert.
setBinaryTransfer(boolean) - Method in class com.vertica.jdbc.DataSource
Sets the flag that indicates whether or not to use binary transfer
setConnectionLoadBalance(boolean) - Method in class com.vertica.jdbc.DataSource
Sets the flag that indicates whether or not to use native load balancing.
setConnSettings(String) - Method in class com.vertica.jdbc.DataSource
ConnSettings are sql statements that the driver will execute when a connection is made.
setDatabase(String) - Method in class com.vertica.jdbc.DataSource
Set the database for the data source.
setDay(int) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the days component of this interval.
setDisableCopyLocal(boolean) - Method in class com.vertica.jdbc.DataSource
Sets the value of the connection setting that determines whether file-based COPY LOCAL operations are disabled.
setEnableRoutableQueries(boolean) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setFailOnMultiNodePlans(boolean) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setFraction(int, int) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the fraction component of this interval.
setHost(String) - Method in class com.vertica.jdbc.DataSource
Set the host for the data source.
setHostNameVerifier(String) - Method in class com.vertica.jdbc.DataSource
Set user defined HostnameVerifier.
setHour(int) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the hours component of this interval.
setIsNegative(boolean) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the sign of this interval.
setJAASConfigName(String) - Method in class com.vertica.jdbc.DataSource
Sets the name of the JAAS configuration entry that will be used when performing GSS-Kerberos authentication.
setKerberosHostName(String) - Method in class com.vertica.jdbc.DataSource
Sets the host name portion of the kerberos service principal that identifies the Vertica server.
setKerberosServiceName(String) - Method in class com.vertica.jdbc.DataSource
Sets the service name portion of the kerberos service principal that identifies the Vertica server.
setKeyStorePassword(String) - Method in class com.vertica.jdbc.DataSource
Sets the password protecting the keystore file.
setKeyStorePath(String) - Method in class com.vertica.jdbc.DataSource
Sets the path to a keystore file (typically in .jks format) to be used for TLS connections.
setLimit(int) - Method in interface com.vertica.jdbc.kv.VGet
Deprecated.
Imposes a limit on the number of rows returned by VGet.execute().
setLocale(String) - Method in class com.vertica.jdbc.DataSource
Set the locale for the data source.
setLogDirectory(String) - Method in class com.vertica.jdbc.DataSource
Sets the directory used to store log files.
setLoginNetworkTimeout(int) - Method in class com.vertica.jdbc.DataSource
Set the loginNetworkTimeout for the data source.
setLoginNodeTimeout(int) - Method in class com.vertica.jdbc.DataSource
Set the loginNodeTimeout for the data source.
setLoginTimeout(int) - Method in class com.vertica.jdbc.DataSource
Set the login timeout for the data source.
setLogLevel(String) - Method in class com.vertica.jdbc.DataSource
Sets the log level
Valid values:
OFF (no logging)
INFO
WARNING
TRACE
ERROR
DEBUG (most verbose)
An invalid value will set log level to OFF
setLogNameSpace(String) - Method in class com.vertica.jdbc.DataSource
Sets the package that logging is restricted to.
setMarsEnabled(boolean) - Method in class com.vertica.jdbc.DataSource
setMaxPooledConnections(int) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setMaxPooledConnectionsPerNode(int) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setMaxPooledConnectionUses(int) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setMetadataCacheLifetime(int) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setMinute(int) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the minutes component of this interval.
setMonth(int) - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Sets the months component of this interval.
setNetworkTimeout(int) - Method in class com.vertica.jdbc.DataSource
Sets the network timeout.
setNodeDownWaitTime(int) - Method in class com.vertica.jdbc.DataSource
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
setOAuthAccessToken(String) - Method in class com.vertica.jdbc.DataSource
Sets the access token used for OAuth authentication.
setOAuthClientId(String) - Method in class com.vertica.jdbc.DataSource
Sets the client ID used for OAuth authentication.
setOAuthClientSecret(String) - Method in class com.vertica.jdbc.DataSource
Sets the client secret used for OAuth authentication.
setOAuthDiscoveryUrl(String) - Method in class com.vertica.jdbc.DataSource
Sets the discovery url used to fetch the OAuth token endpoint.
setOAuthRefreshToken(String) - Method in class com.vertica.jdbc.DataSource
Sets the refresh token used for OAuth authentication.
setOAuthScope(String) - Method in class com.vertica.jdbc.DataSource
Sets the scope of the access request used for OAuth token refresh.
setOAuthTokenUrl(String) - Method in class com.vertica.jdbc.DataSource
Sets the token url used for OAuth authentication.
setPort(int) - Method in class com.vertica.jdbc.DataSource
Set the port for the data source as an integer.
setPort(short) - Method in class com.vertica.jdbc.DataSource
Set the port for the data source.
setPreferredAddressFamily(String) - Method in class com.vertica.jdbc.DataSource
Sets the address family type to prefer when the driver resolves hostnames.
setProperty(String, Object) - Method in interface com.vertica.jdbc.VerticaConnection
Sets a Vertica specific property on this connection.
setReadOnly(boolean) - Method in class com.vertica.jdbc.DataSource
Set if the data source is read only.
setResultBufferSize(long) - Method in class com.vertica.jdbc.DataSource
Set the maximum amount of data to cache in bytes when streaming ResultSet data.
setSearchPath(String) - Method in class com.vertica.jdbc.DataSource
Sets the schema search path for this data source.
setSecond(int) - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Sets the seconds component of this interval.
setSessionLabel(String) - Method in class com.vertica.jdbc.DataSource
Set the session label for the data source.
setSessionTimezone(String) - Method in class com.vertica.jdbc.DataSource
setSocketFactoryName(String) - Method in class com.vertica.jdbc.DataSource
Set the custom socket factory name for the data source.
setSslEnabled(boolean) - Method in class com.vertica.jdbc.DataSource
Deprecated.
setTLSMode provides finer grained control over the TLS connection process
setSSLSocketFactoryName(String) - Method in class com.vertica.jdbc.DataSource
Set the custom SSL socket factory name for the data source.
setStreamingBatchInsert(boolean) - Method in class com.vertica.jdbc.DataSource
Sets the value of the connection setting that determines whether the
streaming or non-streaming batch insert model is used.
setThreePartNaming(boolean) - Method in class com.vertica.jdbc.DataSource
Set three part naming for the data source.
setTLSMode(String) - Method in class com.vertica.jdbc.DataSource
Set TLS Mode for data source.
setTrustStorePassword(String) - Method in class com.vertica.jdbc.DataSource
Sets the password protecting the truststore file.
setTrustStorePath(String) - Method in class com.vertica.jdbc.DataSource
Sets the path to a truststore file (typically in .jks format) to be used for TLS connections.
setUser(String) - Method in class com.vertica.jdbc.DataSource
Sets the current user
setYear(int) - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Sets the years component of this interval.
start() - Method in class com.vertica.jdbc.VerticaCopyStream
Starts the copy operation, optionally sending over any InputStream data that has been
added to this VerticaCopyStream thus far (via VerticaCopyStream.execute()).
SUBPROTOCOL_NAME - Static variable in class com.vertica.jdbc.Driver
The subprotocol is the portion of the connection string
that comes after "jdbc:" but before the "://".
supportsConsistentRead() - Method in interface com.vertica.jdbc.kv.VerticaRoutableConnection
Deprecated.
Checks to see if the VerticaRoutableConnection.beginConsistentRead() and VerticaRoutableConnection.endConsistentRead() methods
are supported.
T
toString() - Method in class com.vertica.jdbc.VerticaDayTimeInterval
Returns a string representation of this interval.
toString() - Method in class com.vertica.jdbc.VerticaYearMonthInterval
Returns a string representation of this interval.
U
unwrap(Class) - Method in class com.vertica.jdbc.DataSource
useConnectionLoadBalance() - Method in class com.vertica.jdbc.DataSource
Get whether or not connection load balancing is in use.
useThreePartNaming() - Method in class com.vertica.jdbc.DataSource
Get if three-part naming is used for the data source.
UUID - Static variable in class com.vertica.jdbc.VerticaTypes
The ODBC SQL type identifier for a UUID.
V
valueOf(String) - Static method in enum com.vertica.jdbc.kv.VGet.SortOrder
Deprecated.
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.vertica.jdbc.kv.VGet.SortOrder
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
VerticaConnection - Interface in com.vertica.jdbc
This interface defines the public Vertica Analytic Database extensions to
java.sql.Connection.
VerticaCopyStream - Class in com.vertica.jdbc
A bulk loading utility that sends COPY FROM LOCAL STDIN data from a JDBC client
to the Vertica database.
VerticaCopyStream(VerticaConnection, String) - Constructor for class com.vertica.jdbc.VerticaCopyStream
Creates a new VerticaCopyStream to execute the specified statement.
VerticaCopyStream(VerticaConnection, String, InputStream) - Constructor for class com.vertica.jdbc.VerticaCopyStream
Creates a new VerticaCopyStream to execute the specified statement.
VerticaCopyStream(VerticaConnection, String, List) - Constructor for class com.vertica.jdbc.VerticaCopyStream
Creates a new VerticaCopyStream to execute the specified statement.
VerticaDatabaseErrorInfo - Interface in com.vertica.jdbc
Exposes additional information about errors that occur on the database server.
VerticaDayTimeInterval - Class in com.vertica.jdbc
The JDBC representation of the Vertica INTERVAL DAY TO SECOND type.
VerticaDayTimeInterval(int, int, int, int, int, int, boolean) - Constructor for class com.vertica.jdbc.VerticaDayTimeInterval
VerticaDayTimeInterval(int, int, int, int, int, int, int, boolean) - Constructor for class com.vertica.jdbc.VerticaDayTimeInterval
Constructs a new VerticaDayTimeInterval.
VerticaPreparedStatement - Interface in com.vertica.jdbc
This interface defines the public Vertica Analytic Database extensions to
java.sql.Statement.
VerticaRoutableConnection - Interface in com.vertica.jdbc.kv
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
VerticaRoutableExecutor - Interface in com.vertica.jdbc.kv
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
VerticaStatement - Interface in com.vertica.jdbc
This interface defines the public Vertica Analytic Database extensions to
java.sql.Statement.
VerticaTypes - Class in com.vertica.jdbc
This class defines Vertica identifiers for data types Vertica supports but
which are not represented in java.sql.types.
VerticaTypes() - Constructor for class com.vertica.jdbc.VerticaTypes
VerticaYearMonthInterval - Class in com.vertica.jdbc
The JDBC representation of the Vertica INTERVAL YEAR TO MONTH type.
VerticaYearMonthInterval(int, int, boolean) - Constructor for class com.vertica.jdbc.VerticaYearMonthInterval
Constructs a new VerticaYearMonthInterval.
VerticaYearMonthInterval(int, int, int, boolean) - Constructor for class com.vertica.jdbc.VerticaYearMonthInterval
Constructs a new VerticaYearMonthInterval.
VGet - Interface in com.vertica.jdbc.kv
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
VGet.SortOrder - Enum in com.vertica.jdbc.kv
Deprecated.
Describes the ordering of result data.
VHash - Class in com.vertica.jdbc.kv
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
VHash() - Constructor for class com.vertica.jdbc.kv.VHash
Deprecated.
Creates an instance suitable for computing a hash of a chain of values,
for use when a projection is segmented by multiple columns.
A B C D E F G H I P R S T U V
12 - 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
13 - VerticaCopyStream
public class VerticaCopyStream
extends java.lang.Object
A bulk loading utility that sends COPY FROM LOCAL STDIN data from a JDBC client
to the Vertica database. To bulk load data, provide any InputStream(s)
and a COPY FROM LOCAL STDIN statement that describes the stream's format and a
destination table.
The start() method begins a copy statement. If any streams have
already been provided, they are sent at this point. The execute()
method can optionally continue the execution. It sends any streams that
have been added via addStream(InputStream) since the last start() or execute()
operation, Finally, to end the copy statement, and get the total number of
rows added during the entire copy operation, call the finish()
method.
Though the start(), execute() and finish() methods are designed to work on
a single copy statement open over multiple method calls, there are cases
when the driver must split what is logically a single operation into multiple
distinct commands.
This utility honors the connection's autocommit setting, meaning that
upon returning from the start(), execute() or finish()
methods, the driver will have committed the transaction when autocommit is enabled.
It is not illegal to add data streams to a VerticaCopyStream across
transactions, but this will result in degraded performance, as separate ROS
containers will be created on the server for each transaction's copy operation.
For best performance, disable autocommit when using this utility.
Similarly, because the driver can only allow one statement to run on
a connection at a time, interleaving other statement executions between calls
to start(), execute() or finish() will
force the open copy statement to end, so that the other statement may execute.
In this case, a new copy operation will begin upon the next call
to execute() or finish(). This will create multiple ROS containers
and degrade performance. Furthermore, if the copy statement does not have the NO COMMIT
option, then each interleaved statement will in effect end the transaction, even
when autocommit is turned off.
To track the progress of the load, the getRejects() method returns a list
of' row numbers that the server rejected. Each call to start(),
execute() or finish() will send over any stream(s) added via addStream(InputStream)
that have not yet been sent to the server. The rejections from the streams(s) sent during the
last start(), execute() or finish() operation will be available via getRejects().
This list is cleared with each new call to start(), execute() or finish().
This class also implements Exceptions and Rejections files where, if specified in the
Copy statement, the rejected rows will be written to the file designated as REJECTED DATA
and the reason for rejection will be written to the designated EXCEPTIONS file. If these
are specified, the driver will return an empty list with any calls to getRejects(). The
rejection files will contain more detailed rejection information and can be checked instead.
Constructor Summary
| Constructor and Description |
| VerticaCopyStream(VerticaConnection conn, java.lang.String copyStatement) Creates a new VerticaCopyStream to execute the specified statement. |
| VerticaCopyStream(VerticaConnection conn, java.lang.String copyStatement, java.io.InputStream source) Creates a new VerticaCopyStream to execute the specified statement. |
| VerticaCopyStream(VerticaConnection conn, java.lang.String copyStatement, java.util.List sources) Creates a new VerticaCopyStream to execute the specified statement. |
Method Summary
| Modifier and Type |
Method and Description |
| void |
addStream(java.io.InputStream input) Adds a stream to the list of streams to send in the copy statement. |
| void |
execute() |
| long |
finish() Finishes the copy statement. |
| java.util.List |
getRejects() Returns a list of row numbers corresponding to the rows in the input streams that were rejected by the server. |
| long |
getRowCount() Gets the final row count for the entire copy operation. |
| void |
start() Starts the copy operation, optionally sending over any InputStream data that has been added to this VerticaCopyStream thus far (via execute()). |
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
VerticaCopyStream
public VerticaCopyStream(VerticaConnection conn,
java.lang.String copyStatement)
throws java.sql.SQLException
Creates a new VerticaCopyStream to execute the specified statement.
Parameters:conn - The connection to run the copy statement on.copyStatement - A COPY FROM STDIN statement to execute.
Throws:
java.sql.SQLException - If creation of new copy stream fails.
VerticaCopyStream
public VerticaCopyStream(VerticaConnection conn,
java.lang.String copyStatement,
java.io.InputStream source)
throws java.sql.SQLException
Creates a new VerticaCopyStream to execute the specified statement.
Parameters:conn - The connection to run the copy statement on.copyStatement - A COPY FROM STDIN statement to execute.source - A data stream in the format expected by the copy statement.
Throws:
java.sql.SQLException - If creation of new copy stream fails.
VerticaCopyStream
public VerticaCopyStream(VerticaConnection conn,
java.lang.String copyStatement,
java.util.List sources)
throws java.sql.SQLException
Creates a new VerticaCopyStream to execute the specified statement.
Parameters:conn - The connection to run the copy statement on.copyStatement - A COPY FROM STDIN statement to execute.sources - A list of data streams, each in the format expected by the copy statement. The streams will be copied sequentially into the database.
Throws:
java.sql.SQLException - If creation of new copy stream fails.
Method Detail
start
public void start()
throws java.sql.SQLException
Starts the copy operation, optionally sending over any InputStream data that has been
added to this VerticaCopyStream thus far (via execute()). The statement is left
open so that more data streams can be added.
Throws:
java.sql.SQLException - If start operation fails.
execute
public void execute()
throws java.sql.SQLException
Throws:
java.sql.SQLException - If this COPY operation has not yet been started, or a database error occurs.
addStream
public void addStream(java.io.InputStream input)
throws java.sql.SQLException
Adds a stream to the list of streams to send in the copy statement.
The data will be sent to the database on the next call to
start(), execute() or finish().
Parameters:input - The stream to add.
Throws:
java.sql.SQLException - If addStream operation fails.
finish
public long finish()
throws java.sql.SQLException
Finishes the copy statement. If streams have been added
but not yet executed, they will be executed.
Returns
The total number of rows that were added to the table during this COPY operation.
Throws:
java.sql.SQLException - If finish operation fails.
getRejects
public java.util.List getRejects()
Returns a list of row numbers corresponding to the rows in the input
streams that were rejected by the server. This should be checked
after each call to start(), execute() or finish()
to see which rows were rejected. When a new execution starts, the previous
list of rejected rows is discarded.
This list will be empty if EXCEPTIONS or REJECTED DATA files are specified
Returns
A list of row numbers that were rejected by the server during the last execution.
getRowCount
public long getRowCount()
Gets the final row count for the entire copy operation. This will be remain
zero until finish() has been called.
Returns
The total number of rows successfully copied to the database.
14 - VerticaDatabaseErrorInfo
public interface VerticaDatabaseErrorInfo
Exposes additional information about errors that occur on the database server.
When a server-side error occurs, the database may provide the the client with
additional context and troubleshooting information about the error. The
information available depends on the type of error that occurred.
For example, when a SQL Syntax error occurs, the database may indicate a position
within the SQL query text where the syntax was invalid, and a suggestion for
altering the query text to make the query succeed.
The information provided by this interface is also queryable in the database
via the v_monitor.error_messages system table.
This interface provides accessors to retrieve that information after
an error has occurred. If the type of information was not available or relevant
for the given error, the method should return null.
Method Summary
| Modifier and Type |
Method and Description |
| java.lang.String |
getDetail() |
| int |
getErrorCode() |
| java.lang.String |
getErrorLevel() Returns the severity classification for the error. |
| java.lang.String |
getHint() |
| java.lang.String |
getMessage() |
| int |
getPosition() |
| java.lang.String |
getSQLState() |
Method Detail
getMessage
java.lang.String getMessage()
Returns
A description of the error.
getDetail
java.lang.String getDetail()
Returns
Additional information about the error (optional). Null if not applicable.
getHint
java.lang.String getHint()
Returns
A suggestion for how to resolve the error (optional). Null if not applicable.
getSQLState
java.lang.String getSQLState()
Returns
The SQLState code for this error.
getErrorCode
int getErrorCode()
Returns
A unique error code for this error.
getPosition
int getPosition()
Returns
The position within the SQL command that caused the error. The first character is at position 1. Returns 0 if not applicable to the error.
getErrorLevel
java.lang.String getErrorLevel()
Returns the severity classification for the error. Possible values are:
"NOTICE": The command completed but also yielded some diagnostic information.
"WARNING": The command completed but also yielded some warning information.
"ERROR": The error caused the command the fail.
"ROLLBACK": The error caused the current transaction to roll back.
"FATAL": The error caused the database server to end the client's session.
"PANIC": The error caused the database server to shut down.
Returns
The severity of the error.
15 - VerticaDayTimeInterval
-
java.lang.Object
-
com.vertica.dsi.dataengine.utilities.DSITimeSpan
-
com.vertica.jdbc.VerticaDayTimeInterval
-
All Implemented Interfaces:
java.lang.Cloneable
public class VerticaDayTimeInterval
extends com.vertica.dsi.dataengine.utilities.DSITimeSpan
implements java.lang.Cloneable
The JDBC representation of the Vertica INTERVAL DAY TO SECOND type.
It represents a span of time measured in days, hours, minutes, seconds and nanoseconds.
The JDBC specification does not define first class support for interval
data types. There are no java.sql.Types type identifiers for intervals,
there is no built in setter on the PreparedStatement interface and
no built in getter on the ResultSet interface.
Instead, the Vertica JDBC driver follows the ODBC standard when it can.
Each of the 10 day/time interval ranges is identified by the
ODBC standard SQL type identifier. Those identifiers are recreated as
integer fields in this class, analogous to those defined for the
other data types by java.sql.Types.
To insert a day/time interval into the database, create an instance
of this class and pass it to PreparedStatement.setObject,
optionally passing one of the ODBC SQL types defined
by this class as the target type parameter.
To retrieve a VericaDayTimeInterval from the database, select an INTERVAL
DAY TO SECOND column, call ResultSet.getObject and cast the result to
a VerticaDayTimeInterval
Field Summary
| Modifier and Type |
Field and Description |
| static int |
INTERVAL_DAY Deprecated. superseded by VerticaTypes.INTERVAL_DAY |
| static int |
INTERVAL_DAY_TO_HOUR Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_HOUR |
| static int |
INTERVAL_DAY_TO_MINUTE Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_MINUTE |
| static int |
INTERVAL_DAY_TO_SECOND Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_SECOND |
| static int |
INTERVAL_HOUR Deprecated. superseded by VerticaTypes.INTERVAL_HOUR |
| static int |
INTERVAL_HOUR_TO_MINUTE Deprecated. superseded by VerticaTypes.INTERVAL_HOUR_TO_MINUTE |
| static int |
INTERVAL_HOUR_TO_SECOND Deprecated. superseded by VerticaTypes.INTERVAL_HOUR_TO_SECOND |
| static int |
INTERVAL_MINUTE Deprecated. superseded by VerticaTypes.INTERVAL_MINUTE |
| static int |
INTERVAL_MINUTE_TO_SECOND Deprecated. superseded by VerticaTypes.INTERVAL_MINUTE_TO_SECOND |
| static int |
INTERVAL_SECOND Deprecated. superseded by VerticaTypes.INTERVAL_SECOND |
Constructor Summary
| Constructor and Description |
| VerticaDayTimeInterval(int day, int hour, int minute, int second, int fraction, int fracPrecision, boolean isNegative) |
| VerticaDayTimeInterval(int type, int day, int hour, int minute, int second, int fraction, int fracPrecision, boolean isNegative) Constructs a new VerticaDayTimeInterval. |
Method Summary
| Modifier and Type |
Method and Description |
| VerticaDayTimeInterval |
clone() Returns a deep copy of this VerticaDayTimeInterval. |
| boolean |
equals(java.lang.Object obj) Returns true if obj is a VerticaDayTimeInterval and it represents the same span of time as this interval, regardless of which units are set. |
| int |
getIntervalType() Gets the ODBC SQL type identifier for this interval. |
| int |
getPrecision() |
| int |
hashCode() The hash code of an interval is computed first by converting the value of this interval to a number of nanoseconds. |
| static boolean |
isDayTimeInterval(int type) A helper method to determine if the provided ODBC interval subtype identifier corresponds to one of the 10 day/time intervals that this class is capable of representing. |
| void |
setDay(int day) Sets the days component of this interval. |
| void |
setFraction(int fraction, int precision) Sets the fraction component of this interval. |
| void |
setHour(int hour) Sets the hours component of this interval. |
| void |
setIsNegative(boolean isNegative) Sets the sign of this interval. |
| void |
setMinute(int minute) Sets the minutes component of this interval. |
| void |
setSecond(int second) Sets the seconds component of this interval. |
| java.lang.String |
toString() Returns a string representation of this interval. |
Methods inherited from class com.vertica.dsi.dataengine.utilities.DSITimeSpan
getDay, getFraction, getHour, getMinute, getSecond, isNegative, setFraction
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Field Detail
INTERVAL_DAY
public static final int INTERVAL_DAY
Deprecated. superseded by VerticaTypes.INTERVAL_DAY
The ODBC SQL type identifier for an INTERVAL DAY interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_HOUR
public static final int INTERVAL_DAY_TO_HOUR
Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_HOUR
The ODBC SQL type identifier for an INTERVAL DAY TO HOUR interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_MINUTE
public static final int INTERVAL_DAY_TO_MINUTE
Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_MINUTE
The ODBC SQL type identifier for an INTERVAL DAY TO MINUTE interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_SECOND
public static final int INTERVAL_DAY_TO_SECOND
Deprecated. superseded by VerticaTypes.INTERVAL_DAY_TO_SECOND
The ODBC SQL type identifier for an INTERVAL DAY TO SECOND interval.
See Also:Constant Field Values
INTERVAL_HOUR
public static final int INTERVAL_HOUR
Deprecated. superseded by VerticaTypes.INTERVAL_HOUR
The ODBC SQL type identifier for an INTERVAL HOUR interval.
See Also:Constant Field Values
INTERVAL_HOUR_TO_MINUTE
public static final int INTERVAL_HOUR_TO_MINUTE
Deprecated. superseded by VerticaTypes.INTERVAL_HOUR_TO_MINUTE
The ODBC SQL type identifier for an INTERVAL HOUR TO MINUTE interval.
See Also:Constant Field Values
INTERVAL_HOUR_TO_SECOND
public static final int INTERVAL_HOUR_TO_SECOND
Deprecated. superseded by VerticaTypes.INTERVAL_HOUR_TO_SECOND
The ODBC SQL type identifier for an INTERVAL HOUR TO SECOND interval.
See Also:Constant Field Values
INTERVAL_MINUTE
public static final int INTERVAL_MINUTE
Deprecated. superseded by VerticaTypes.INTERVAL_MINUTE
The ODBC SQL type identifier for an INTERVAL MINUTE interval.
See Also:Constant Field Values
INTERVAL_MINUTE_TO_SECOND
public static final int INTERVAL_MINUTE_TO_SECOND
Deprecated. superseded by VerticaTypes.INTERVAL_MINUTE_TO_SECOND
The ODBC SQL type identifier for an INTERVAL MINUTE TO SECOND interval.
See Also:Constant Field Values
INTERVAL_SECOND
public static final int INTERVAL_SECOND
Deprecated. superseded by VerticaTypes.INTERVAL_SECOND
The ODBC SQL type identifier for an INTERVAL SECOND interval.
See Also:Constant Field Values
Constructor Detail
VerticaDayTimeInterval
public VerticaDayTimeInterval(int day,
int hour,
int minute,
int second,
int fraction,
int fracPrecision,
boolean isNegative)
VerticaDayTimeInterval
public VerticaDayTimeInterval(int type,
int day,
int hour,
int minute,
int second,
int fraction,
int fracPrecision,
boolean isNegative)
Constructs a new VerticaDayTimeInterval.
Parameters:type - The ODBC SQL type identifier for this interval.day - The number of days in this interval. Must be no less than zero.hour - The number of hours in this interval. Must be no less than zero.minute - The number of minutes in this interval. Must be no less than zero.second - The number of seconds in this interval. Must be no less than zero.fraction - The fractional seconds in this interval. Must be no less than zero.fracPrecision - The precision of the fractional seconds, 6 or less (database can't store more).isNegative - True if this interval is negative, false if positive.
Throws:
java.lang.IllegalArgumentException - If any of the parameters are negative, or if type is not one of the ODBC SQL type identifiers defined by this class.
Method Detail
getPrecision
public int getPrecision()
setDay
public void setDay(int day)
Sets the days component of this interval. If this interval has
no day component, it will be converted to the closest
unit representable by the type. Any fraction on the converted
value is rounded down.
Overrides
setDay in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:day - A positive number of days.
Throws:
java.lang.IllegalArgumentException - If day is negative, or if using this many days would cause the interval to overflow.
setHour
public void setHour(int hour)
Sets the hours component of this interval. If this interval has
no hour component, it will be converted to the closest
unit representable by the type. Any fraction on the converted
value is rounded down.
Overrides
setHour in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:hour - A positive number of hours.
Throws:
java.lang.IllegalArgumentException - If hour is negative, or if using this many hours would cause the interval to overflow.
setMinute
public void setMinute(int minute)
Sets the minutes component of this interval. If this interval has
no minute component, it will be converted to the closest
unit representable by the type. Any fraction on the converted
value is rounded down.
Overrides
setMinute in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:minute - A positive number of minutes.
Throws:
java.lang.IllegalArgumentException - If minute is negative, or if using this many minutes would cause the interval to overflow.
setSecond
public void setSecond(int second)
Sets the seconds component of this interval. If this interval has
no minute component, it will be converted to the closest
unit representable by the type. Any fraction on the converted
value is rounded down.
Overrides
setSecond in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:second - A positive number of seconds.
Throws:
java.lang.IllegalArgumentException - If second is negative, or if using this many seconds would cause the interval to overflow.
setFraction
public void setFraction(int fraction,
int precision)
Sets the fraction component of this interval. If this interval has
no fraction component, it will be converted to the closest
unit representable by the type.
Parameters:fraction - A positive number of microseconds.precision - The precision to use for this interval.
Throws:
java.lang.IllegalArgumentException - If fraction is negative, or if using this many microseconds would cause the interval to overflow.
setIsNegative
public void setIsNegative(boolean isNegative)
Sets the sign of this interval.
Overrides
setIsNegative in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:isNegative - true if this interval is negative, false otherwise.
hashCode
public int hashCode()
The hash code of an interval is computed first by converting
the value of this interval to a number of nanoseconds.
Since the hash code must fit in an integer, It is possible
that this calculation will overflow. Regardless of whether or
not there was overflow, this number is
then multiplied by -1 if this interval negative.
Overrides
hashCode in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Returns
A hash code for this interval.
equals
public boolean equals(java.lang.Object obj)
Returns true if obj is a VerticaDayTimeInterval
and it represents the same span of time as this interval,
regardless of which units are set.
Overrides
equals in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Parameters:obj - An object to compare.
Returns
true if obj has the same sign, day, hour, minute, second and fraction as this interval.
clone
public VerticaDayTimeInterval clone()
Returns a deep copy of this VerticaDayTimeInterval.
Equivalent to calling new VerticaDayTimeInterval(getIntervalType(), getDay(), getHour(), getMinute(), getSecond(), getFraction(), isNegative())
Overrides
clone in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Returns
A copy of this interval.
toString
public java.lang.String toString()
Returns a string representation of this interval. The format of this string is the same format
that is recognized by the driver and database. Fields outside this interval's range (as
defined by the ODBC type identifier) are not included in the String.
Overrides
toString in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Returns
The string representation of this interval.
getIntervalType
public int getIntervalType()
Gets the ODBC SQL type identifier for this interval.
An interval's range can be determined by comparing
the return value of this method with the
INTERVAL_* constants defined in this class.
Overrides
getIntervalType in class com.vertica.dsi.dataengine.utilities.DSITimeSpan
Returns
The ODBC SQL type identifier for this interval.
isDayTimeInterval
public static boolean isDayTimeInterval(int type)
A helper method to determine if the provided ODBC interval
subtype identifier corresponds to one of the 10 day/time
intervals that this class is capable of representing.
The SQL_DATETIME_SUB column of the ResultSet returned by
DatabaseMetaData.getColumns() will contain an ODBC interval
subtype when the column is an interval. When this happens,
the object returned by the driver when selecting that
column will be a VerticaDayTimeInterval when
the subtype is one of the 10 interval subtypes defined
in this class. This helper method checks the provided type to
see if it matches one of those 10 types.
Parameters:type - An ODBC interval subtype identifier.
Returns
true if type corresponds to one of the 10 day/time interval types representable by a VerticaDayTimeInterval.
16 - VerticaPreparedStatement
- All Superinterfaces:
java.lang.AutoCloseable, java.sql.PreparedStatement, java.sql.Statement, java.sql.Wrapper
public interface VerticaPreparedStatement
extends java.sql.PreparedStatement
This interface defines the public Vertica Analytic Database extensions to
java.sql.Statement. All PreparedStatements constructed by the Vertica JDBC
driver implement VerticaPreparedStatement.
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Method Summary
Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
17 - VerticaRoutableConnection
- All Superinterfaces:
java.lang.AutoCloseable, java.sql.Connection, VerticaConnection, java.sql.Wrapper
Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
@Deprecated
public interface VerticaRoutableConnection
extends VerticaConnection
Provides advanced routing capabilities beyond those of a normal VerticaConnection.
The VerticaRoutableConnection provides access to the VGet, which performs efficient
key-based lookups. Connections returned by the driver will implement this interface when the EnableRoutableQueries
connection property is set to true.
The VerticaRoutableConnection maintains an internal pool of connections and a cache of table metadata
that is shared by all VGets that are produced by this connection's prepareGet(String, String)
method. It is also a fully-fledged JDBC connection on its own. It supports all the functionality
that a VerticaConnection supports. When this connection is closed, all pooled connections managed
by this VerticaRoutableConnection and all child VGets are closed too.
By default, a VerticaRoutableConnection's internal pool will use no more than 20 concurrent connections to a cluster and
no more than 5 concurrent connections to a given node (these are in addition to the single connection used for normal
JDBC Connection operations). Those numbers can be overridden with the MaxPooledConnections and MaxPooledConnectionsPerNode
connection properties. Using a large number of connections can improve VGet performance, but it can be taxing
to keep many connections open on a busy cluster. It is important for users to configure these numbers optimally
for their cluster's workload.
Because VGet operations utilize multiple JDBC connections (and multiple Vertica sessions), they
can not honor the connection's JDBC transaction semantics. If consistency across multiple VGet operations
is required, history must be enabled. Only VGet operations that have this limitation; other operations
on this connection do follow normal transaction semantics.
The supportsConsistentRead() method can be used to check if history is enabled.
When supportsConsistentRead() returns true, the beginConsistentRead() and endConsistentRead() methods
can be used to guarantee that all child VGet operations occur at the same epoch.
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 |
| void |
beginConsistentRead() Deprecated. All subsequent VGet accesses will read from a consistent snapshot acquired at the time this method call is made. |
| void |
clearMetadataCache() Deprecated. Clears the cached projection metadata used by all VGets constructed by this connection. |
| VerticaRoutableExecutor |
createRoutableExecutor(java.lang.String schema, java.lang.String tableOrProjection) Deprecated. Create a KV query executor for a table/projection. |
| void |
endConsistentRead() Deprecated. Stops using snapshot acquired by the last call to beginConsistentRead(). |
| VGet |
prepareGet(java.lang.String schema, java.lang.String tableOrProj) Deprecated. Creates a VGet for the given table or projection. |
| boolean |
supportsConsistentRead() Deprecated. Checks to see if the beginConsistentRead() and endConsistentRead() methods are supported. |
Methods inherited from interface com.vertica.jdbc.VerticaConnection
getLastDatabaseError, getProperty, setProperty
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
prepareGet
VGet prepareGet(java.lang.String schema,
java.lang.String tableOrProj)
throws java.sql.SQLException
Deprecated.
Creates a VGet for the given table or projection.
Parameters:schema - The schema name of the table or projection to get values from.tableOrProj - The name of a table or projection to get values from.
Returns
A VGet instance for the provided table/projection.
Throws:
java.sql.SQLException - Thrown if the schema or table does not exist, or if a database access error occurs.
void clearMetadataCache()
throws java.sql.SQLException
Deprecated.
Clears the cached projection metadata used by all VGets constructed by this connection.
Throws:
java.sql.SQLException - Thrown if a database access error occurs.
supportsConsistentRead
boolean supportsConsistentRead()
throws java.sql.SQLException
Deprecated.
Checks to see if the beginConsistentRead() and endConsistentRead() methods
are supported. To support consistent reads, historical queries must be enabled in the database.
Returns
true if history retention is enabled on this database cluster.
Throws:
java.sql.SQLException - Thrown if a database access error occurs.See Also:beginConsistentRead(),
endConsistentRead()
beginConsistentRead
void beginConsistentRead()
throws java.sql.SQLException
Deprecated.
All subsequent VGet accesses will read from
a consistent snapshot acquired at the time this method call is made.
Care must be taken to configure Vertica to maintain historical
snapshots (see AHM management in the Vertica documentation). If Vertica
invalidates the snapshot, subsequent accesses will fail with error
"Can't run historical queries at epochs prior to the Ancient History Mark"
Throws:
java.sql.SQLException - Thrown if snapshot cannot be acquired or if a database access error occurs.See Also:endConsistentRead()
endConsistentRead
void endConsistentRead()
throws java.sql.SQLException
Deprecated.
Stops using snapshot acquired by the last call to beginConsistentRead().
Throws:
java.sql.SQLException - Thrown if a database access error occurs.See Also:beginConsistentRead()
createRoutableExecutor
VerticaRoutableExecutor createRoutableExecutor(java.lang.String schema,
java.lang.String tableOrProjection)
throws java.sql.SQLException
Deprecated.
Create a KV query executor for a table/projection.
Parameters:schema - The schema name of the table or projection to get values from.tableOrProjection - The name of a table or projection to get values from.
Returns
a routable executor instance
Throws:
java.sql.SQLException - Thrown if a database access error occurs.
18 - VerticaRoutableExecutor
- Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
@Deprecated
public interface VerticaRoutableExecutor
An alternate API for KV queries that takes a SQL query as an argument, plus the column/value bindings
that are necessary to compute the targeted node. Simply call the execute(String, Map) method (or, if there is only one column name/value pair, execute(String, String, Object)) to run query.
Both VerticaRoutableExecutor and the VGet API uses the same internal operations to route
the queries.
Method Summary
| Modifier and Type |
Method and Description |
| void |
close() Deprecated. Release resource used by this VerticaRoutableExecutor - close the result set(s) |
| java.sql.ResultSet |
execute(java.lang.String sql, java.util.Map segKey) Deprecated. Execute a query using these segmentation key values arguments. |
| java.sql.ResultSet |
execute(java.lang.String sql, java.lang.String segCol, java.lang.Object value) Deprecated. Execute a query using a single column name/value pair as the routing information. |
| java.sql.SQLWarning |
getWarnings() Deprecated. Get SQLWarning after an VGet.execute() call. |
Method Detail
execute
java.sql.ResultSet execute(java.lang.String sql,
java.util.Map segKey)
throws java.sql.SQLException
Deprecated.
Execute a query using these segmentation key values arguments.
Parameters:sql - The query to be routed.segKey - The map containing column name/value pairs.
Returns
the result set created by the routable query.
Throws:
java.sql.SQLException - Query not routable or has failed.
execute
java.sql.ResultSet execute(java.lang.String sql,
java.lang.String segCol,
java.lang.Object value)
throws java.sql.SQLException
Deprecated.
Execute a query using a single column name/value pair as the routing information.
Parameters:sql - The query to be routed.segCol - The column name.value - The column value.
Returns
the result set created by the routable query.
Throws:
java.sql.SQLException - Query not routable or has failed.
close
void close()
throws java.sql.SQLException
Deprecated.
Release resource used by this VerticaRoutableExecutor - close the result set(s)
Throws:
java.sql.SQLException - close operation has failed.
getWarnings
java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
Deprecated.
Get SQLWarning after an VGet.execute() call.
See VGet.getWarnings()
Returns
SQLWarning from execute call.
Throws:
java.sql.SQLException - attempt to get warning has failed.
19 - VerticaStatement
- All Superinterfaces:
java.lang.AutoCloseable, java.sql.Statement, java.sql.Wrapper
public interface VerticaStatement
extends java.sql.Statement
This interface defines the public Vertica Analytic Database extensions to
java.sql.Statement. All Statements constructed by the Vertica JDBC
driver implement VerticaStatement.
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Method Summary
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
20 - VerticaTypes
public class VerticaTypes
extends java.lang.Object
This class defines Vertica identifiers for data types Vertica supports but
which are not represented in java.sql.types.
These identifiers are used in metadata queries and to give Vertica JDBC
applications a way to specify the types and determine how to correctly get
or set their values.
Interval type constants
The JDBC specification does not define first class support for interval
data types. There are no java.sql.Types type identifiers for intervals,
there is no built in setter on the PreparedStatement interface and
no built in getter on the ResultSet interface.
Instead, the Vertica JDBC driver follows the ODBC standard when it can.
Each of the 10 day/time interval ranges is identified by the
ODBC standard SQL type identifier. Those identifiers are recreated as
integer fields in this class, analogous to those defined for the
other data types by java.sql.Types.
UUID type constant
The JDBC specification does not define a UUID type. The Vertica JDBC
driver uses the ODBC type identifier for UUIDs.
Field Summary
| Modifier and Type |
Field and Description |
| static int |
INTERVAL_DAY The ODBC SQL type identifier for an INTERVAL DAY interval. |
| static int |
INTERVAL_DAY_TO_HOUR The ODBC SQL type identifier for an INTERVAL DAY TO HOUR interval. |
| static int |
INTERVAL_DAY_TO_MINUTE The ODBC SQL type identifier for an INTERVAL DAY TO MINUTE interval. |
| static int |
INTERVAL_DAY_TO_SECOND The ODBC SQL type identifier for an INTERVAL DAY TO SECOND interval. |
| static int |
INTERVAL_HOUR The ODBC SQL type identifier for an INTERVAL HOUR interval. |
| static int |
INTERVAL_HOUR_TO_MINUTE The ODBC SQL type identifier for an INTERVAL HOUR TO MINUTE interval. |
| static int |
INTERVAL_HOUR_TO_SECOND The ODBC SQL type identifier for an INTERVAL HOUR TO SECOND interval. |
| static int |
INTERVAL_MINUTE The ODBC SQL type identifier for an INTERVAL MINUTE interval. |
| static int |
INTERVAL_MINUTE_TO_SECOND The ODBC SQL type identifier for an INTERVAL MINUTE TO SECOND interval. |
| static int |
INTERVAL_MONTH The ODBC SQL type identifier for an INTERVAL MONTH interval. |
| static int |
INTERVAL_SECOND The ODBC SQL type identifier for an INTERVAL SECOND interval. |
| static int |
INTERVAL_YEAR The ODBC SQL type identifier for an INTERVAL YEAR interval. |
| static int |
INTERVAL_YEAR_TO_MONTH The ODBC SQL type identifier for an INTERVAL YEAR TO MONTH interval. |
| static int |
UUID The ODBC SQL type identifier for a UUID. |
Constructor Summary
| Constructor and Description |
| VerticaTypes() |
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
INTERVAL_DAY
public static final int INTERVAL_DAY
The ODBC SQL type identifier for an INTERVAL DAY interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_HOUR
public static final int INTERVAL_DAY_TO_HOUR
The ODBC SQL type identifier for an INTERVAL DAY TO HOUR interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_MINUTE
public static final int INTERVAL_DAY_TO_MINUTE
The ODBC SQL type identifier for an INTERVAL DAY TO MINUTE interval.
See Also:Constant Field Values
INTERVAL_DAY_TO_SECOND
public static final int INTERVAL_DAY_TO_SECOND
The ODBC SQL type identifier for an INTERVAL DAY TO SECOND interval.
See Also:Constant Field Values
INTERVAL_HOUR
public static final int INTERVAL_HOUR
The ODBC SQL type identifier for an INTERVAL HOUR interval.
See Also:Constant Field Values
INTERVAL_HOUR_TO_MINUTE
public static final int INTERVAL_HOUR_TO_MINUTE
The ODBC SQL type identifier for an INTERVAL HOUR TO MINUTE interval.
See Also:Constant Field Values
INTERVAL_HOUR_TO_SECOND
public static final int INTERVAL_HOUR_TO_SECOND
The ODBC SQL type identifier for an INTERVAL HOUR TO SECOND interval.
See Also:Constant Field Values
INTERVAL_MINUTE
public static final int INTERVAL_MINUTE
The ODBC SQL type identifier for an INTERVAL MINUTE interval.
See Also:Constant Field Values
INTERVAL_MINUTE_TO_SECOND
public static final int INTERVAL_MINUTE_TO_SECOND
The ODBC SQL type identifier for an INTERVAL MINUTE TO SECOND interval.
See Also:Constant Field Values
INTERVAL_SECOND
public static final int INTERVAL_SECOND
The ODBC SQL type identifier for an INTERVAL SECOND interval.
See Also:Constant Field Values
INTERVAL_YEAR
public static final int INTERVAL_YEAR
The ODBC SQL type identifier for an INTERVAL YEAR interval.
See Also:Constant Field Values
INTERVAL_YEAR_TO_MONTH
public static final int INTERVAL_YEAR_TO_MONTH
The ODBC SQL type identifier for an INTERVAL YEAR TO MONTH interval.
See Also:Constant Field Values
INTERVAL_MONTH
public static final int INTERVAL_MONTH
The ODBC SQL type identifier for an INTERVAL MONTH interval.
See Also:Constant Field Values
UUID
public static final int UUID
The ODBC SQL type identifier for a UUID.
See Also:Constant Field Values
Constructor Detail
VerticaTypes
public VerticaTypes()
21 - VerticaYearMonthInterval
-
java.lang.Object
-
com.vertica.dsi.dataengine.utilities.DSIMonthSpan
-
com.vertica.jdbc.VerticaYearMonthInterval
-
All Implemented Interfaces:
java.lang.Cloneable
public class VerticaYearMonthInterval
extends com.vertica.dsi.dataengine.utilities.DSIMonthSpan
implements java.lang.Cloneable
The JDBC representation of the Vertica INTERVAL YEAR TO MONTH type. It represents
a span of time measured in years and months.
The JDBC specification does not define first class support for interval
data types. There are no java.sql.Types type identifiers for intervals,
there is no built in setter on the PreparedStatement interface and
no built in getter on the ResultSet interface.
Instead, the Vertica JDBC driver follows the ODBC standard when it can.
Each of the 3 year/month interval ranges is identified by the
ODBC standard SQL type identifier. Those identifiers are recreated as
integer fields in this class, analogous to those defined for the
other data types by java.sql.Types.
To insert a year/month interval into the database, create an instance
of this class and pass it to PreparedStatement.setObject,
optionally passing one of the ODBC SQL types defined
by this class as the target type parameter.
To retrieve a VericaYearMonthInterval from the database, select an INTERVAL YEAR TO MONTH
column, call ResultSet.getObject and cast the result to
a VerticaYearMonthInterval
Field Summary
| Modifier and Type |
Field and Description |
| static int |
INTERVAL_MONTH Deprecated. superseded by VerticaTypes.INTERVAL_MONTH |
| static int |
INTERVAL_YEAR Deprecated. superseded by VerticaTypes.INTERVAL_YEAR |
| static int |
INTERVAL_YEAR_TO_MONTH Deprecated. superseded by VerticaTypes.INTERVAL_YEAR_TO_MONTH |
Constructor Summary
| Constructor and Description |
| VerticaYearMonthInterval(int year, int month, boolean isNegative) Constructs a new VerticaYearMonthInterval. |
| VerticaYearMonthInterval(int type, int year, int month, boolean isNegative) Constructs a new VerticaYearMonthInterval. |
Method Summary
| Modifier and Type |
Method and Description |
| VerticaYearMonthInterval |
clone() Returns a deep copy of this VerticaYearMonthInterval. |
| boolean |
equals(java.lang.Object obj) Returns true if obj is a VerticaYearMonthInterval and it represents the same span of time as this interval, regardless of which units are set. |
| int |
getIntervalType() Gets the ODBC SQL type identifier for this interval. |
| int |
hashCode() The hash code of an interval is calculated first by converting this interval to a number of months. |
| static boolean |
isYearMonthInterval(int type) A helper method to determine if the provided ODBC interval subtype identifier corresponds to one of the 3 year/month intervals that this class is capable of representing. |
| void |
setMonth(int month) Sets the months component of this interval. |
| void |
setYear(int year) Sets the years component of this interval. |
| java.lang.String |
toString() Returns a string representation of this interval. |
Methods inherited from class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
getMonth, getYear, isNegative, setIsNegative
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Field Detail
INTERVAL_YEAR
public static final int INTERVAL_YEAR
Deprecated. superseded by VerticaTypes.INTERVAL_YEAR
The ODBC SQL type identifier for an INTERVAL YEAR interval.
See Also:Constant Field Values
INTERVAL_YEAR_TO_MONTH
public static final int INTERVAL_YEAR_TO_MONTH
Deprecated. superseded by VerticaTypes.INTERVAL_YEAR_TO_MONTH
The ODBC SQL type identifier for an INTERVAL YEAR TO MONTH interval.
See Also:Constant Field Values
INTERVAL_MONTH
public static final int INTERVAL_MONTH
Deprecated. superseded by VerticaTypes.INTERVAL_MONTH
The ODBC SQL type identifier for an INTERVAL MONTH interval.
See Also:Constant Field Values
Constructor Detail
VerticaYearMonthInterval
public VerticaYearMonthInterval(int year,
int month,
boolean isNegative)
Constructs a new VerticaYearMonthInterval. The type is assumed to be INTERVAL_YEAR_TO_MONTH.
Parameters:year - The number of years in this interval. Must be no less than zero.month - The number of months in this interval. Must be no less than zero.isNegative - True if this interval is negative, false if positive.
Throws:
java.lang.IllegalArgumentException - If year or month are negative.
VerticaYearMonthInterval
public VerticaYearMonthInterval(int type,
int year,
int month,
boolean isNegative)
Constructs a new VerticaYearMonthInterval.
Parameters:type - The ODBC SQL type identifier for this interval.year - The number of years in this interval. Must be no less than zero.month - The number of months in this interval. Must be no less than zero.isNegative - True if this interval is negative, false if positive.
Throws:
java.lang.IllegalArgumentException - If year or month are negative, or if type is not one of the ODBC SQL type identifiers defined by this class.
Method Detail
setYear
public void setYear(int year)
Sets the years component of this interval. If this interval has
no year component, it will be converted to a number of months.
Overrides
setYear in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Parameters:year - A positive number of years.
Throws:
java.lang.IllegalArgumentException - If year is negative, or if using this many years would cause the interval to overflow.
setMonth
public void setMonth(int month)
Sets the months component of this interval. If this interval has
no month component, it will be converted to a number of years.
Any fraction on the converted years value is rounded down.
Overrides
setMonth in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Parameters:month - A positive number of months.
Throws:
java.lang.IllegalArgumentException - If month is negative, or if using this many months would cause the interval to overflow.
hashCode
public int hashCode()
The hash code of an interval is calculated first
by converting this interval to a number of months.
Since the hash code must fit in an integer,
it is possible that this calculation will overflow.
Regardless of whether or not there was overflow,
this number is then multiplied by -1 if this interval negative.
Overrides
hashCode in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Returns
A hash code for this interval.
equals
public boolean equals(java.lang.Object obj)
Returns true if obj is a VerticaYearMonthInterval
and it represents the same span of time as this interval,
regardless of which units are set. For example,
a SQL INTERVAL YEAR of 1 year is equal to an
INTERVAL YEAR TO MONTH of 1 year, 0 months,
and an INTERVAL MONTH of 12 months.
Overrides
equals in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Parameters:obj - An object to compare.
Returns
true if obj represents the same span of time as this interval.
clone
public VerticaYearMonthInterval clone()
Returns a deep copy of this VerticaYearMonthInterval.
Equivalent to calling new VerticaYearMonthInterval(getIntervalType(), getYear(), getMonth(), isNegative())
Overrides
clone in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Returns
A copy of this interval.
toString
public java.lang.String toString()
Returns a string representation of this interval. The format of this string is the same format
that is recognized by the driver and database. Fields smaller than this interval's range (as
defined by the ODBC type identifier) are not included in the String.
Overrides
toString in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Returns
The string representation of this interval.
getIntervalType
public int getIntervalType()
Gets the ODBC SQL type identifier for this interval.
An interval's range can be determined by comparing
the return value of this method with the
INTERVAL_* constants defined in this class.
Overrides
getIntervalType in class com.vertica.dsi.dataengine.utilities.DSIMonthSpan
Returns
The ODBC SQL type identifier for this interval.
isYearMonthInterval
public static boolean isYearMonthInterval(int type)
A helper method to determine if the provided ODBC interval
subtype identifier corresponds to one of the 3 year/month
intervals that this class is capable of representing.
The SQL_DATETIME_SUB column of the ResultSet returned by
DatabaseMetaData.getColumns() will contain an ODBC interval
subtype when the column is an interval. When this happens,
the object returned by the driver when selecting that
column will be a VerticaYearMonthInterval when
the subtype is one of the 3 interval subtypes defined
in this class. This helper method checks the provided type to
see if it matches one of those 3 types.
Parameters:type - An ODBC interval subtype identifier.
Returns
true If type corresponds to one of the 3 year/month interval types representable by a VerticaYearMonthInterval.
22 - VGet
- Deprecated.
This feature is likely to stop working in a future release and to be removed as a result.
@Deprecated
public interface VGet
A scalable key-based accessor for table data. The VGet directly queries
Vertica nodes that have the data needed for the query, avoiding the distributed
planning and execution costs associated with a normal execution.
For workloads that access single rows based on a primary key, the VGet can
be used to achieve lower latency and higher throughput than a traditional execution.
The VGet uses projection segmentation metadata and a set of equality predicates on
table columns to determine an appropriate projection and node to send a query to.
The addPredicate(String, Object) method is used to specify equality
predicates on table columns. The VGet uses these predicates to evaluate the segmentation
expression on the client to determine which node to query. At a minimum, the predicates
columns passed must cover the segmentation expression of at least one of the
table's underlying projections.
Call the execute() method to run query. By default, the VGet fetches all
the columns of all the rows that satisfy the logical AND of all the
equality predicates passed via addPredicate(String, Object).
To further customize the get operation, the addOutputColumn(String), addOutputExpression(String)
addPredicateExpression(String), addSortColumn(String, SortOrder) and
setLimit(int) may be used.
addOutputExpression(String) and addPredicateExpression(String) accept arbitrary
SQL expressions that operate on the table's columns as input. Care must be taken to ensure that
the columns exist on the table and projection used by the VGet, and that the expressions do not require
distributed resources to execute. If an expression is sufficiently complex as to require
more than one node to execute, execute() will throw a SQLException if the FailOnMultiNodePlans connection
property is true.
Internally, VGet operations span multiple JDBC connections (and multiple Vertica sessions)
and therefore do not honor the parent connection's transaction semantics. If consistency is
required across multiple executions, the parent VerticaRoutableConnection's
consistent read API can be used to guarantee all operations occur at the same epoch.
The VGet is thread safe, but all methods are synchronized, so threads that share a VGet instance will never run in parallel.
For better parallelism, each thread should have its own VGet instance. All VGet instances created by the same VerticaRoutableConnection
share pooled connections and metadata in a manner that enables a high degree of parallelism.
Nested Class Summary
| Modifier and Type |
Interface and Description |
| static class |
VGet.SortOrder Deprecated. Describes the ordering of result data. |
Method Summary
| Modifier and Type |
Method and Description |
| void |
addOutputColumn(java.lang.String outputCol) Deprecated. Adds an output column to the ResultSet returned by execute(). |
| void |
addOutputExpression(java.lang.String outputExpr) Deprecated. Adds the result of a free-form SQL expression to the ResultSet returned by execute(). |
| void |
addPredicate(java.lang.String column, java.lang.Object value) Deprecated. Adds or updates a column equality predicate. |
| void |
addPredicateExpression(java.lang.String expr) Deprecated. Adds a free-form SQL predicate to filter results. |
| void |
addSortColumn(java.lang.String column, VGet.SortOrder order) Deprecated. Adds the specified column to the sort order of the result. |
| void |
clearOutputs() Deprecated. Clears out all outputs added with addOutputColumn(String) and addOutputExpression(String). |
| void |
clearPredicates() Deprecated. Clears out all predicates added with addPredicate(String, Object) and addPredicateExpression(String). |
| void |
clearSortColumns() Deprecated. Clears out all columns added to the sort by addSortColumn(String, SortOrder) |
| void |
close() Deprecated. Releases resources used by this VGet. |
| java.sql.ResultSet |
execute() Deprecated. Fetches the desired results. |
| java.sql.SQLWarning |
getWarnings() Deprecated. Retrieves the first warning reported by calls on this VGet. |
| void |
setLimit(int limit) Deprecated. Imposes a limit on the number of rows returned by execute(). |
Method Detail
addPredicate
void addPredicate(java.lang.String column,
java.lang.Object value)
throws java.sql.SQLException
Deprecated.
Adds or updates a column equality predicate.
Before execution, this method must be called for all columns of the segmentation key.
Additional predicates on non-key columns are also allowed.
Parameters:column - The name of a column.value - The value of the column. Pass null to indicate a SQL NULL.
Throws:
java.sql.SQLException - If the column does not exist or the value is not compatible with the data type of the column.
addPredicateExpression
void addPredicateExpression(java.lang.String expr)
throws java.sql.SQLException
Deprecated.
Adds a free-form SQL predicate to filter results. Predicates can be on any column in the table.
Segmentation key columns may be used, but must also be specified with addPredicate(String, Object).
Currently the VGet does not check columns references in predicate expressions. Because
they are not checked, the VGet can not ensure that they will exist on the projection chosen to answer
the query. This can happen if a projection's column names do not match the anchor table's column names, or if
the projection is not a superprojection. If this occurs, execute() will fail with a syntax error.
To avoid this error, applications can override the VGet's projection choice by passing a projection name instead
of a table name to VerticaRoutableConnection.prepareGet(String, String)
Parameters:expr - A valid SQL expression acting on a column in the table. Incorrect syntax will cause execute() to fail.
Throws:
java.sql.SQLException - If this VGet is closed. In the future, may fail if the expression has invalid syntax.
clearPredicates
void clearPredicates()
Deprecated.
Clears out all predicates added with addPredicate(String, Object) and addPredicateExpression(String).
addSortColumn
void addSortColumn(java.lang.String column,
VGet.SortOrder order)
throws java.sql.SQLException
Deprecated.
Adds the specified column to the sort order of the result.
Parameters:column - The name of a column in the tableorder - The sort order for the column
Throws:
java.sql.SQLException - If this VGet is closed, or if the column does not exist on this table
clearSortColumns
void clearSortColumns()
Deprecated.
Clears out all columns added to the sort by addSortColumn(String, SortOrder)
addOutputColumn
void addOutputColumn(java.lang.String outputCol)
throws java.sql.SQLException
Deprecated.
Adds an output column to the ResultSet returned by execute().
If no output columns or expressions are specified, the entire row is returned.
Parameters:outputCol - A column from the table.
Throws:
java.sql.SQLException - If the column does not exist on this table.
addOutputExpression
void addOutputExpression(java.lang.String outputExpr)
throws java.sql.SQLException
Deprecated.
Adds the result of a free-form SQL expression to the ResultSet returned by execute().
The expression can reference and perform computation on any columns in the table.
If no output columns or expressions are specified, the entire row is returned.
Currently the VGet does not check columns references in output expressions. Because
they are not checked, the VGet can not ensure that they will exist on the projection chosen to answer
the query. This can happen if a projection's column names do not match the anchor table's column names, or if
the projection is not a superprojection. If this occurs, execute() will fail with a syntax error.
To avoid this error, applications can override the VGet's projection choice by passing a projection name instead
of a table name to VerticaRoutableConnection.prepareGet(String, String)
Parameters:outputExpr - A valid SQL expression. Incorrect syntax will cause execute() to fail.
Throws:
java.sql.SQLException - If this VGet is closed. In the future, may fail if the expression has invalid syntax.
clearOutputs
void clearOutputs()
Deprecated.
Clears out all outputs added with addOutputColumn(String) and addOutputExpression(String).
setLimit
void setLimit(int limit)
Deprecated.
Imposes a limit on the number of rows returned by execute().
The default value of zero indicates no limit.
Parameters:limit - A maximum number of rows to return, or zero to indicate no limit.
execute
java.sql.ResultSet execute()
throws java.sql.SQLException
Deprecated.
Fetches the desired results. Routes the request directly to the node containing the data.
If the get operation requires a distributed execution (due to complex expressions specified
by addOutputExpression(String) or addPredicateExpression(String)) and
FailOnMultiNodePlans is set to true, this will throw a SQLException. If FailOnMultiNodePlans is
false, a warning is generated and returned by getWarnings().
Returns
A ResultSet iterator over the rows of data produced by the get operation.
Throws:
java.sql.SQLException - If not enough predicates were provided to determine the routing, or if a database error occurs.
close
void close()
throws java.sql.SQLException
Deprecated.
Releases resources used by this VGet.
Throws:
java.sql.SQLException - If close operation fails.
getWarnings
java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
Deprecated.
Retrieves the first warning reported by calls on this VGet.
Subsequent warnings will be chained to the SQLWarning returned.
The warning chain is cleared with each call to execute().
Returns
The first SQLWarning, or null if there are no warnings
Throws:
java.sql.SQLException - If attempt to get warning fails.
23 - VGet.SortOrder
-
java.lang.Object
-
java.lang.Enum
-
com.vertica.jdbc.kv.VGet.SortOrder
-
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Enclosing interface:
VGet
public static enum VGet.SortOrder
extends java.lang.Enum
Describes the ordering of result data.
Semantics for ordering are the same as Vertica's ORDER BY clause.
Enum Constant Summary
| Enum Constant and Description |
| ASC |
| DESC |
Method Summary
| Modifier and Type |
Method and Description |
| static VGet.SortOrder |
valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. |
| static VGet.SortOrder[] |
values() Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Enum Constant Detail
ASC
public static final VGet.SortOrder ASC
DESC
public static final VGet.SortOrder DESC
Method Detail
values
public static VGet.SortOrder[] values()
Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (VGet.SortOrder c : VGet.SortOrder.values())
System.out.println(c);
Returns
an array containing the constants of this enum type, in the order they are declared
valueOf
public static VGet.SortOrder valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
Parameters:name - the name of the enum constant to be returned.
Returns
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null
24 - VHash
@Deprecated
public class VHash
extends java.lang.Object
Implementation of Vertica's hash function used for data segmentation on the
cluster. For single-value hashing, use static methods. For multi-value
hashing, instantiate the class and call the add methods to add each value
(order matters).
Constructor Summary
| Constructor and Description |
| VHash() Deprecated. Creates an instance suitable for computing a hash of a chain of values, for use when a projection is segmented by multiple columns. |
Method Summary
| Modifier and Type |
Method and Description |
| void |
addBoolean(boolean v) Deprecated. adds hash of boolean value to the chain. |
| void |
addBooleanNull() Deprecated. adds hash of boolean null value to the chain. |
| void |
addBytes(byte[] v) Deprecated. adds hash of binary value to the chain. |
| void |
addDate(java.util.Date v, java.util.Calendar c) Deprecated. adds hash of Date value to the chain. |
| void |
addDate(java.sql.Date v, java.util.Calendar c) Deprecated. adds hash of Date value to the chain. |
| void |
addDouble(double v) Deprecated. adds hash of double value to the chain. |
| void |
addDoubleNull() Deprecated. adds hash of double null value to the chain. |
| void |
addLong(long v) Deprecated. adds hash of long value to the chain. |
| void |
addNull() Deprecated. Adds hash of null value to the chain. |
| void |
addNumeric(java.math.BigDecimal src, int typemod) Deprecated. adds hash of numeric value to the chain |
| void |
addString(java.lang.String v) Deprecated. adds hash of String value to the chain. |
| void |
addTime(java.util.Date v, java.util.Calendar c) Deprecated. adds hash of Time value to the chain. |
| void |
addTime(java.sql.Time v, java.util.Calendar c) Deprecated. adds hash of Time value to the chain. |
| void |
addTimestamp(java.util.Date v, java.util.Calendar c) Deprecated. adds hash of Timestamp value to the chain. |
| void |
addTimestamp(long v) Deprecated. adds hash of Timestamp value expressed as milliseconds since Jan 1, 1970 UTC to the chain. |
| void |
addTimestamp(java.sql.Timestamp v, java.util.Calendar c) Deprecated. adds hash of Timestamp value to the chain. |
| void |
addUUID(java.util.UUID v) Deprecated. adds hash of UUID value to the chain. |
| void |
addUUIDNull() Deprecated. adds hash of null UUID to the chain. |
| long |
getHash() Deprecated. returns the current hash value |
| static java.lang.String |
getNodeFor(java.sql.Connection conn, java.lang.String schema, java.lang.String proj, long hashValue) Deprecated. Returns the name of the node that will be responsible for the provided value in the hash space for a given projection. |
| static java.lang.String |
getNodeFor(java.lang.String getProjSegmentsOutput, long hashValue) Deprecated. Given a projection's get_projection_segments() output, this method will return the node that is responsible for the provided hashValue. |
| static long |
hashBoolean(boolean v) Deprecated. compute hash of boolean value |
| static long |
hashBooleanNull() Deprecated. compute hash of boolean null value |
| static long |
hashBytes(byte[] b) Deprecated. compute hash of a binary value |
| static long |
hashBytesNull() Deprecated. compute hash of a binary null value |
| static long |
hashBytesNull(long input) Deprecated. compute hash of a binary null value |
| static long |
hashDate(java.util.Date v) Deprecated. compute hash of java.util.Date value |
| static long |
hashDate(java.sql.Date v) Deprecated. compute hash of java.sql.Date value |
| static long |
hashDouble(double v) Deprecated. compute hash of double value |
| static long |
hashDoubleNull() Deprecated. compute hash of double null value |
| static long |
hashLong(long v) Deprecated. compute hash of long value |
| static long |
hashNull() Deprecated. Compute hash of null value |
| static long |
hashNull(long input) Deprecated. compute hash of null value. |
| static long |
hashNumeric(java.math.BigDecimal src, int typemod) Deprecated. compute hash of a numeric value |
| static long |
hashString(java.lang.String s) Deprecated. compute hash of String value |
| static long |
hashStringNull() Deprecated. compute hash of String null value |
| static long |
hashTime(java.sql.Time v) Deprecated. compute hash of Time value |
| static long |
hashTimestamp(long java_ms) Deprecated. compute hash of Timestamp value expressed in milliseconds since Jan 1, 1970. |
| static long |
hashTimestamp(java.sql.Timestamp v) Deprecated. compute hash of java.sql.Timestamp value |
| static long |
hashUUID(java.util.UUID v, long input) Deprecated. compute hash of UUID value. |
| static long |
hashUUIDNull() Deprecated. compute a hash of a null UUID value. |
| static long |
hashUUIDNull(long input) Deprecated. compute a hash of a null UUID value. |
| void |
reset() Deprecated. resets hash value for next chain. |
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
VHash
public VHash()
Deprecated.
Creates an instance suitable for computing a hash of a chain of values,
for use when a projection is segmented by multiple columns.
Method Detail
hashBooleanNull
public static long hashBooleanNull()
Deprecated.
compute hash of boolean null value
Returns
long hash value
hashBoolean
public static long hashBoolean(boolean v)
Deprecated.
compute hash of boolean value
Parameters:v - boolean value to hash
Returns
long hash value
hashLong
public static long hashLong(long v)
Deprecated.
compute hash of long value
Parameters:v - long value to hash
Returns
long hash value
hashNull
public static long hashNull(long input)
Deprecated.
compute hash of null value. First argument used to hash a list of
values.
Parameters:input - long value from previous hash function output
Returns
long hash value
hashNull
public static long hashNull()
Deprecated.
Compute hash of null value
Returns
long hash value
hashUUID
public static long hashUUID(java.util.UUID v,
long input)
Deprecated.
compute hash of UUID value.
Parameters:v - fixed binary value to hashinput - variable input value to hash
Returns
long hash value
hashUUIDNull
public static long hashUUIDNull(long input)
Deprecated.
compute a hash of a null UUID value. First argument used to hash a list of
values.
Parameters:input - long value from previous hash function output
Returns
The hash for null UUID.
hashUUIDNull
public static long hashUUIDNull()
Deprecated.
compute a hash of a null UUID value.
Returns
The hash for null UUID.
hashDouble
public static long hashDouble(double v)
Deprecated.
compute hash of double value
Parameters:v - double value to hash
Returns
long hash value
hashDoubleNull
public static long hashDoubleNull()
Deprecated.
compute hash of double null value
Returns
long hash value
hashTimestamp
public static long hashTimestamp(long java_ms)
Deprecated.
compute hash of Timestamp value expressed in milliseconds since Jan 1, 1970.
Parameters:java_ms - A number of milliseconds since Jan 1, 1970 GMT
Returns
long hash value
hashDate
public static long hashDate(java.util.Date v)
Deprecated.
compute hash of java.util.Date value
Parameters:v - Date value to hash
Returns
long hash value
hashDate
public static long hashDate(java.sql.Date v)
Deprecated.
compute hash of java.sql.Date value
Parameters:v - Date value to hash
Returns
long hash value
hashTimestamp
public static long hashTimestamp(java.sql.Timestamp v)
Deprecated.
compute hash of java.sql.Timestamp value
Parameters:v - Timestamp value to hash
Returns
long hash value
hashTime
public static long hashTime(java.sql.Time v)
Deprecated.
compute hash of Time value
Parameters:v - Time value to hash
Returns
long hash value
hashString
public static long hashString(java.lang.String s)
Deprecated.
compute hash of String value
Parameters:s - String value to hash
Returns
long hash value
hashStringNull
public static long hashStringNull()
Deprecated.
compute hash of String null value
Returns
long hash value
hashBytesNull
public static long hashBytesNull()
Deprecated.
compute hash of a binary null value
Returns
long hash value
hashBytesNull
public static long hashBytesNull(long input)
Deprecated.
compute hash of a binary null value
Parameters:input - long value from previous hash function output
Returns
long hash value
hashBytes
public static long hashBytes(byte[] b)
Deprecated.
compute hash of a binary value
Parameters:b - binary value to hash
Returns
long hash value
hashNumeric
public static long hashNumeric(java.math.BigDecimal src,
int typemod)
Deprecated.
compute hash of a numeric value
Parameters:src - Numeric value to hashtypemod - The precision and scale of the numeric.
Returns
long hash value
reset
public void reset()
Deprecated.
resets hash value for next chain.
addNull
public void addNull()
Deprecated.
Adds hash of null value to the chain. Use hashBooleanNull() to hash a boolean null.
addBoolean
public void addBoolean(boolean v)
Deprecated.
adds hash of boolean value to the chain.
Parameters:v - boolean value to hash
addBooleanNull
public void addBooleanNull()
Deprecated.
adds hash of boolean null value to the chain.
addLong
public void addLong(long v)
Deprecated.
adds hash of long value to the chain.
Parameters:v - long value to hash
addUUID
public void addUUID(java.util.UUID v)
Deprecated.
adds hash of UUID value to the chain.
Parameters:v - fixed binary value to hash
addUUIDNull
public void addUUIDNull()
Deprecated.
adds hash of null UUID to the chain.
addString
public void addString(java.lang.String v)
Deprecated.
adds hash of String value to the chain.
Parameters:v - String value to hash
addBytes
public void addBytes(byte[] v)
Deprecated.
adds hash of binary value to the chain.
Parameters:v - String value to hash
addTimestamp
public void addTimestamp(long v)
Deprecated.
adds hash of Timestamp value expressed as milliseconds since Jan 1, 1970 UTC to the chain.
Parameters:v - long value to hash
addDate
public void addDate(java.util.Date v,
java.util.Calendar c)
Deprecated.
adds hash of Date value to the chain.
Parameters:v - Date value to hashc - The calendar to providing a timezone context for v.
addDate
public void addDate(java.sql.Date v,
java.util.Calendar c)
Deprecated.
adds hash of Date value to the chain.
Parameters:v - Date value to hash.c - The calendar to providing a timezone context for v.
addTimestamp
public void addTimestamp(java.sql.Timestamp v,
java.util.Calendar c)
Deprecated.
adds hash of Timestamp value to the chain.
Parameters:v - Timestamp value to hashc - The calendar to providing a timezone context for v.
addTimestamp
public void addTimestamp(java.util.Date v,
java.util.Calendar c)
Deprecated.
adds hash of Timestamp value to the chain.
Parameters:v - Timestamp value to hashc - The calendar to providing a timezone context for v.
addTime
public void addTime(java.sql.Time v,
java.util.Calendar c)
Deprecated.
adds hash of Time value to the chain.
Parameters:v - Time value to hashc - The calendar to providing a timezone context for v. The date component of the calendar will influence the time due to DST.
addTime
public void addTime(java.util.Date v,
java.util.Calendar c)
Deprecated.
adds hash of Time value to the chain.
Parameters:v - Time value to hashc - The calendar to providing a timezone context for v. The date component of the calendar will influence the time due to DST.
addDouble
public void addDouble(double v)
Deprecated.
adds hash of double value to the chain.
Parameters:v - double value to hash
addDoubleNull
public void addDoubleNull()
Deprecated.
adds hash of double null value to the chain.
addNumeric
public void addNumeric(java.math.BigDecimal src,
int typemod)
Deprecated.
adds hash of numeric value to the chain
Parameters:src - The numeric value to add to hash.typemod - The precision and scale of the numeric.
Throws:
java.lang.IllegalArgumentException - if src is too large to fit in a numeric.
getHash
public long getHash()
Deprecated.
returns the current hash value
Returns
long value of hash
getNodeFor
public static java.lang.String getNodeFor(java.sql.Connection conn,
java.lang.String schema,
java.lang.String proj,
long hashValue)
throws java.sql.SQLException
Deprecated.
Returns the name of the node that will be responsible for the provided value in the hash space
for a given projection.
This method uses the provided Connection to call the get_projection_segments() SQL
meta-function. It then relies on getNodeFor(String, long) to determine
which node to use.
In situations where you need to compute many hashes for the same projection, it is
would be much more efficient to call get_projection_segments() once via JDBC and
then pass that output to getNodeFor(String, long) directly.
Caution: There is no guarantee that connecting to the node returned by
this method will guarantee reduced intra-node traffic for a query or load based on the
input hash value. While that is often true, the Vertica Optmizer may not always construct
such a plan.
Additionally, no check is done to ensure that the input hash value was created in a manner that is
consistent with the segmentation of the provided projection. This means, for example,
if the projection is segmented by an INTEGER column and the caller provides a
hashed DOUBLE PRECISION value, the answer may not be correct.
Parameters:conn - A connection to a vertica database containing the projectionschema - The schema of the projectionproj - The name of the projectionhashValue - A hashed data value for this projection
Returns
The name of the node that is responsible for the provided hash value
Throws:
java.sql.SQLException - If a database error occurs
java.lang.IllegalArgumentException - if the projection provided is not segmented by HASH(...) ALL NODES
getNodeFor
public static java.lang.String getNodeFor(java.lang.String getProjSegmentsOutput,
long hashValue)
Deprecated.
Given a projection's get_projection_segments() output, this
method will return the node that is responsible for the provided hashValue.
The get_projection_segments() SQL meta-function returns a list of the segment
ranges each node is responsible for for a given projection. This method parses
the output of that function and maps the provided hashValue to the range
to determine a node name.
Caution: There is no guarantee that connecting to the node returned by
this method will guarantee reduced intra-node traffic for a query or load based on the
input hash value. While that is often true, the Vertica Optmizer may not always construct
such a plan.
Additionally, no check is done to ensure that the input hash value was created in a manner that is
consistent with the segmentation of the provided projection. This means, for example,
if the projection is segmented by an INTEGER column and the caller provides a
hashed DOUBLE PRECISION value, the answer may not be correct.
Parameters:getProjSegmentsOutput - -- a String containing the return value of the get_projection_segments() SQL meta-function for a particular projection.hashValue - -- a hashed data value for the projection.
Returns
string identifying node.
Throws:
java.lang.IllegalArgumentException - if getProjSegmentsOutput is malformed in any way, either due to bad input or due to not using a properly segmented projection.