This chapter describes the JDBC interfaces, and the Teradata-specific classes, that are supported by the Teradata JDBC Driver.
Note: The following sections contain tables of the methods implemented by the Teradata JDBC Driver, with an indication of the level of support for the method by the Teradata JDBC Driver and the database. Each supported method is also described separately in detail.
This section describes the Array interface methods. Beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, the java.sql.Array interface and the SQL ARRAY data type are supported. A Teradata SQL ARRAY is defined with one or more dimensions, and is used to store many values of the same data type sequentially or in a matrix-like format.
Methods |
Supported |
---|---|
getArray() |
Yes |
getArray(long index, int count) |
Yes |
getArray(long index, int count, Map map) |
Yes |
getArray(Map map) |
Yes |
getBaseType() |
Yes |
getBaseTypeName() |
Yes |
getResultSet() |
Yes |
getResultSet(long index, int count) |
Yes |
getResultSet(long index, int count, Map map) |
Yes |
getResultSet(Map map) |
Yes |
Function: Returns the Array value designated by this Array object in the form of an array in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public Object getArray() throws SQLException |
Return |
An array in the Java programming language that contains the ordered elements of the SQL ARRAY value designated by this Array object. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. This method uses the type map associated with the connection for customizations of the type mappings of Struct objects received from the database. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retrieves a section of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Characteristic |
Description |
---|---|
Syntax |
public Object getArray(long index, int count) throws SQLException where the parameter:
|
Return |
An array containing up to count consecutive elements of the SQL array, beginning with element index. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the type map associated with the connection for customizations of the type mappings of Struct objects received from the database. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retreives a section of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
Characteristic |
Description |
---|---|
Syntax |
public Object getArray(long index, int count, Map map) throws SQLException where the parameter:
|
Return |
An array containing up to count consecutive elements of the SQL ARRAY value designated by this Array object, beginning with element index. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the specified type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retrieves the contents of the SQL ARRAY value designated by this Array object.
Characteristic |
Description |
---|---|
Syntax |
public Object getArray(Map map) throws SQLException where the parameter:
|
Return |
An array in the Java programming language that contains the ordered elements of the SQL array designated by this object. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. This method uses the specified type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retrieves the JDBC type of the elements in the array designated by this Array object.
Characteristic |
Description |
---|---|
Syntax |
public int getBaseType() throws SQLException |
Return |
A constant from the class java.sql.Types that is the type code for the elements in the array designated by this Array object. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. |
Function: Retrieves the SQL type name of the elements in the array designated by this Array object.
Characteristic |
Description |
---|---|
Syntax |
public String getBaseTypeName() throws SQLException |
Return |
a String that is the database-specific name for a built-in base type; or the fully-qualified SQL type name for a base type that is a UDT. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. |
Function: Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getResultSet() throws SQLException |
Return |
a java.sql.ResultSet object containing one row for each of the elements in the array designated by this Array object, with the rows in ascending order based on the indices. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the type map associated with the connection for customizations of the type mappings of Struct objects received from the database. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getResultSet(long index, int count) throws SQLException where the parameter:
|
Return |
A ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object, starting at index index. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the type map associated with the connection for customizations of the type mappings of Struct objects received from the database. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. |
Function: Retrieves a result set holding the elements of the subarray that starts at index index and contains up to count successive elements.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getResultSet(long index, int count, Map map) throws SQLException where the parameter:
|
Return |
A ResultSet object containing up to count consecutive elements of the SQL array designated by this Array object, starting at index index. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the specified type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices. |
Function: Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getResultSet(Map map) throws SQLException where the parameter:
|
Return |
A ResultSet object containing one row for each of the elements in the array designated by this Array object, with the rows in ascending order based on the indices. |
Note: This method is supported beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04, and may only be used with a one-dimensional ARRAY type. This method uses the specified type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. An Array object created by the Connection createArrayOf method is not subject to JDBC custom type mapping. The result set contains one row for each array element, with two columns in each row. The second column stores the element value; the first column stores the index into the array for that element (with the first array element being at index 1). The rows are in ascending order corresponding to the order of the indices. |
This section describes the BLOB interface methods. A BLOB is a large database object that can be anything not requiring character-set conversion, including MIDI, MP3, PDF, and graphics.
Methods |
Supported |
---|---|
free() |
Yes |
getBinaryStream() |
Yes |
getBytes(long pos, int length) |
Yes |
length() |
Yes |
position(Blob pattern, long start) |
No |
position(byte[] pattern, long start) |
No |
setBinaryStream(long pos) |
Yes |
setBytes(long pos, byte[] bytes) |
Yes |
setBytes(long pos, byte[] bytes, int offset, int len) |
Yes |
truncate(long len) |
Yes |
Function: Releases the resources held by this Blob object. After free has been called, the Blob object cannot be used.
The free method is available beginning with Teradata JDBC Driver 14.00.00.08. If the application updates a Blob object, then the application must call free when the application is done with the Blob object; otherwise, database Error 3130 (Response Limit Exceeded) may occur.
With JDK 6.0 and later, the free method is defined in the java.sql.Blob interface, and the free method can be called directly by the application. With JDK 5.0 and earlier, reflection must be used to call the free method.
Characteristic |
Description |
---|---|
Syntax |
public void free() throws SQLException |
Function: Materializes the BLOB value designated by this BLOB object as a stream of uninterpreted bytes.
Characteristic |
Description |
---|---|
Syntax |
public InputStream getBinaryStream() throws SQLException |
Return |
A stream containing the BLOB data is returned. |
Function: Materializes the BLOB value designated by this BLOB object as an array of bytes.
Characteristic |
Description |
---|---|
Syntax |
public byte[] getBytes(long pos, integer length) throws SQLException where
|
Return |
A byte array of size length containing consecutive bytes from the BLOB value is returned. |
Function: Returns the number of bytes in the BLOB value that the BLOB object designates.
Characteristic |
Description |
---|---|
Syntax |
public long length() throws SQLException |
Return |
The length of the BLOB in bytes is returned. |
Function: Retrieves a stream that can be used to write the BLOB value that this BLOB object represents. The stream begins at position pos.
Characteristic |
Description |
---|---|
Syntax |
public OutputStream setBinaryStream(long pos) throws SQLException where the parameter pos is the position in the BLOB value at which to start writing |
Return |
A java.io.OutputStream object to which data can be written is returned. |
Function: Writes the given array of bytes to the BLOB value that this BLOB object represents, starting at position pos, and returns the number of bytes written.
Characteristic |
Description |
---|---|
Syntax |
public int setBytes(long pos, byte[] bytes) throws SQLException where the parameter:
|
Return |
The number of bytes written is returned. |
|
Note: The maximum length of bytes that can be set is 64000. |
Function: Writes all or part of a given byte array to the BLOB value that this BLOB object represents and returns the number of bytes written. Writing starts at position pos in the BLOB value; len bytes from the given byte array are written.
Characteristic |
Description |
---|---|
Syntax |
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException where the parameter:
|
Return |
The number of bytes written is returned. |
|
Note: The maximum length of bytes that can be set is 64000. |
Function: Truncates the BLOB value that this BLOB object represents to be len bytes in length.
Characteristic |
Description |
---|---|
Syntax |
public void truncate(long len) throws SQLException where the parameter len is the length, in bytes, to truncate the BLOB value that this BLOB object represents |
This section describes the CLOB interface methods. A CLOB is a pure character-based large object in a database. It can be a large text file, HTML, RTF, or other character-based file.
Methods |
Supported |
---|---|
free() |
Yes |
getAsciiStream() |
Yes |
getCharacterStream() |
Yes |
getSubString(long pos, int length) |
Yes |
length() |
Yes |
position(Clob searchstr, long start) |
No |
position(String searchstr, long start) |
No |
setAsciiStream(long pos) |
Yes |
setCharacterStream(long pos) |
Yes |
setString(long pos, String str) |
Yes |
setString(long pos, String str, int offset, int len) |
Yes |
truncate(long len) |
Yes |
Function: Releases the resources held by this Clob object. After free has been called, the Clob object cannot be used.
The free method is available beginning with Teradata JDBC Driver 14.00.00.08. If the application updates a Clob object, then the application must call free when the application is done with the Clob object; otherwise, database Error 3130 (Response Limit Exceeded) may occur.
With JDK 6.0 and later, the free method is defined in the java.sql.Clob interface, and the free method can be called directly by the application. With JDK 5.0 and earlier, reflection must be used to call the free method.
Characteristic |
Description |
---|---|
Syntax |
public void free() throws SQLException |
Function: Gets the CLOB value designated by this CLOB object as a stream of ASCII characters.
Characteristic |
Description |
---|---|
Syntax |
public InputStream getAsciiStream() throws SQLException |
Return |
A java.io.InputStream object containing the data in the CLOB is returned. |
Function: Gets the CLOB value designated by this CLOB object as a Unicode stream.
Characteristic |
Description |
---|---|
Syntax |
public Reader getCharacterStream() throws SQLException |
Return |
A java.io.Reader object containing the data in the CLOB is returned. |
Function: Returns a copy of the specified substring in the CLOB value designated by this CLOB object.
Characteristic |
Description |
---|---|
Syntax |
public String getSubString(long pos, int length) throws SQLException where the parameter:
|
Return |
The specified substring in the CLOB as a String is returned. |
Function: Returns the number of bytes in the CLOB value designated by this CLOB object.
Characteristic |
Description |
---|---|
Syntax |
public long length() throws SQLException |
Return |
The length of the CLOB is returned. |
Function: Retrieves a stream to be used to write ASCII characters to the CLOB value that this CLOB object represents, starting at position pos.
Characteristic |
Description |
---|---|
Syntax |
public OutputStream setAsciiStream(long pos) throws SQLException where the parameter pos is the position at which to start writing to this CLOB object |
Return |
The stream to which ASCII-encoded characters can be written is returned. |
Function: Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this CLOB object represents, at position pos.
Characteristic |
Description |
---|---|
Syntax |
public Writer setCharacterStream(long pos) throws SQLException where the parameter pos is the position at which to start writing to the CLOB value |
Return |
A stream to which Unicode-encoded characters can be written is returned. |
Function: Writes the given Java string to the CLOB value that this CLOB object designates at position pos.
Characteristic |
Description |
---|---|
Syntax |
public int setString(long pos, String str) throws SQLException where the parameter:
|
Return |
The number of characters written is returned. |
Note: The maximum number of bytes that can be set is 64000. |
Function: Writes len characters of str, starting at character offset, to the CLOB value that this CLOB represents.
Characteristic |
Description |
---|---|
Syntax |
public int setString(long pos, String str, int offset, int len) throws SQLException where the parameter:
|
Return |
The number of characters written is returned. |
Note: The maximum number of bytes that can be set is 64000. |
Function: Truncates the CLOB value that this CLOB designates to have a length of len characters.
Characteristic |
Description |
---|---|
Syntax |
public void truncate(long len) throws SQLException where the parameter len is the length, in bytes, to which the CLOB value truncates |
A CallableStatement is an object that represents a prepared SQL statement. A CallableStatement is primarily intended to CALL a stored procedure; however, CallableStatements can be used for other kinds of SQL requests.
Starting with Teradata JDBC Driver Release 03.01.00, a macro must be executed using a Statement or PreparedStatement. Previous releases of the Teradata JDBC Driver returned an erroneous result set when the CallableStatement execute or executeQuery method was used to execute a macro.
Methods |
Supported |
---|---|
getArray(int parameterIndex) |
Yes |
getBigDecimal(int parameterIndex) |
Yes |
getBigDecimal(int parameterIndex, int scale) [DEPRECATED] |
Yes |
getBlob(int i) |
Yes |
getBoolean(int parameterIndex) |
Yes |
getByte(int parameterIndex) |
Yes |
getBytes(int parameterIndex) |
Yes |
getClob(int i) |
Yes |
getDate(int parameterIndex) |
Yes |
getDate(int parameterIndex, Calendar cal) |
Yes |
getDouble(int parameterIndex) |
Yes |
getFloat(int parameterIndex) |
Yes |
getInt(int parameterIndex) |
Yes |
getLong(int parameterIndex) |
Yes |
getObject(int parameterIndex) |
Yes |
getObject(int i, Map map) |
Yes |
getRef(int i) |
No |
getShort(int parameterIndex) |
Yes |
getSQLXML(int parameterIndex) |
Yes |
getString(int parameterIndex) |
Yes |
getTime(int parameterIndex) |
Yes |
getTime(int parameterIndex, Calendar cal) |
Yes |
getTimestamp(int parameterIndex) |
Yes |
getTimestamp(int parameterIndex, Calendar cal) |
Yes |
registerOutParameter(int parameterIndex, int sqlType) |
Yes |
registerOutParameter(int parameterIndex, int sqlType, int scale) |
Yes |
registerOutParameter(int parameterIndex, int sqlType, String typeName) |
Yes |
wasNull() |
Yes |
Function: Gets the value of the designated JDBC ARRAY parameter as an Array Object in the Java Programming language.
Characteristic |
Description |
---|---|
Syntax |
public Array getArray(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value as an Array Object is returned. If the value is SQL NULL, the result is null. |
Note: This method is available beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. |
Function: Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with as many digits to the right of the decimal point as the value contains.
Characteristic |
Description |
---|---|
Syntax |
public BigDecimal getBigDecimal(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value in full precision is returned. If the value is SQL NULL, the result is null. |
Function: [DEPRECATED] Gets the value of a JDBC NUMERIC parameter as a java.math.BigDecimal object with scale digits to the right of the decimal point.
Characteristic |
Description |
---|---|
Syntax |
public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException where:
|
Return |
The parameter value in full precision is returned. If the value is SQL NULL, the result is null. |
Function: Gets the value of a JDBC BIT parameter as a boolean in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public boolean getBoolean(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is false. |
Function: Gets the value of a JDBC TINYINT parameter as a byte in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public byte getByte(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Gets the value of a JDBC BINARY or VARBINARY parameter as an array of byte values in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public byte[] getBytes(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Function: Gets the value of a JDBC DATE parameter as a java.sql.Date object.
Characteristic |
Description |
---|---|
Syntax |
public Date getDate(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getDate(); see this method for further information. |
Function: Gets the value of a JDBC DATE parameter as a java.sql.Date object.
Characteristic |
Description |
---|---|
Syntax |
public Date getDate(int parameterIndex, Calendar cal) throws SQLException where
|
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getDate(); see this method for further information. |
Function: Gets the value of a JDBC DOUBLE parameter as a double in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public double getDouble(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Gets the value of a JDBC FLOAT parameter as a float in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public float getFloat(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public int getInt(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Retrieves the Lob data from the input stream and returns it to the database.
Characteristic |
Description |
---|---|
Syntax |
public InputStream getLobData() throws SQLException |
Return |
The Lob data from the input stream to the database is returned. |
Function: Gets the value of a JDBC BIGINT parameter as a long in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public int getLong(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Gets the value of a parameter as an object in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public Object getObject(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
A java.lang.Object holding the OUT parameter value is returned. |
Note: This method returns a Java object whose type corresponds to the JDBC type that was registered for this parameter using the method registerOutParameter. By registering the target JDBC type as java.sql.Types.OTHER, this method can be used to read database-specific abstract data types. |
Function: Gets the value of a JDBC SMALLINT parameter as a short in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public short getShort(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is 0. |
Function: Gets the value of the designated SQL XML parameter as a java.sql.SQLXML object.
Characteristic |
Description |
---|---|
Syntax |
public SQLXML getSQLXML(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: This method is supported beginning with Teradata Database 14.10 and Teradata JDBC Driver 14.00.00.19. JDK 6.0 or later is required to use SQLXML functionality. |
Function: Retrieves the value of a JDBC CHAR, VARCHAR, or LONGVARCHAR parameter as a String in the Java programming language.
Characteristic |
Description |
---|---|
Syntax |
public String getString(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the JDBC CHAR value had in the database, including any padding added by the database. |
Function: Gets the value of a JDBC TIME parameter as a java.sql.Time object.
Characteristic |
Description |
---|---|
Syntax |
public Time getTime(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on Note: Maps to ResultSet.getDate(); see this method for further information. |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getTime(); see this method for further information. |
Function: Gets the value of a JDBC TIME parameter as a java.sql.Time object.
Characteristic |
Description |
---|---|
Syntax |
public Time getTime(int parameterIndex, Calendar cal) throws SQLException where
Note: Maps to ResultSet.getDate(); see this method for further information. |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getTime(); see this method for further information. |
Function: Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
Characteristic |
Description |
---|---|
Syntax |
public Timestamp getTimestamp(int parameterIndex) throws SQLException where the first parameterIndex parameter is 1, the second is 2, and so on |
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getTimestamp(); see this method for further information. |
Function: Gets the value of a JDBC TIMESTAMP parameter as a java.sql.Timestamp object.
Characteristic |
Description |
---|---|
Syntax |
public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException where
|
Return |
The parameter value is returned. If the value is SQL NULL, the result is null. |
Note: Maps to ResultSet.getTimestamp(); see this method for further information. |
Function: Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.
Characteristic |
Description |
---|---|
Syntax |
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException where
|
Note: All OUT parameters must be registered before a stored procedure is executed. The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter. If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method getObject(int) retrieves the value. |
Function: Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.
Characteristic |
Description |
---|---|
Syntax |
public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException where
|
Note: This method must be called before a stored procedure is executed. The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter. This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL. |
Function: Registers the designated output parameter.
Characteristic |
Description |
---|---|
Syntax |
public void registerOutParameter(int parameterIndex, int sqlType, String typename) throws SQLException where
|
Note: The last parameter is ignored. |
Function: Indicates whether or not the last OUT parameter read had the value of SQL NULL.
Characteristic |
Description |
---|---|
Syntax |
public boolean wasNull() throws SQLException |
Return |
True, if the last parameter read was SQL NULL False, otherwise |
Note: This method should be called only after calling the get method; otherwise, there is no value to use in determining whether it is null or not. |
A Connection represents a session with a specific database. Within the context of a Connection, SQL statements are executed and results are returned.
A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so forth. This information is obtained with the getMetaData method.
Note: By default, the Connection automatically commits changes after executing each statement. If auto-commit is disabled, an explicit commit must be done or database changes are not saved.
Methods |
Supported |
---|---|
clearWarnings() |
Yes |
close() |
Yes |
commit() |
Yes |
createArrayOf(String typeName, Object[] elements) |
Yes |
createBlob() |
Yes |
createClob() |
Yes |
createSQLXML() |
Yes |
createStatement() |
Yes |
createStatement(int resultSetType, int resultSetConcurrency) |
Yes |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
Yes |
createStruct(String typeName, Object[] attributes) |
Yes |
getAutoCommit() |
Yes |
getCatalog() |
Yes* |
getClientInfo() |
Yes |
getClientInfo(String name) |
Yes |
getHoldability() |
Yes |
getMetaData() |
Yes |
getTransactionIsolation() |
Yes |
getTypeMap() |
Yes |
getWarnings() |
Yes |
isClosed() |
Yes |
isReadOnly() (always returns False) |
Yes* |
nativeSQL(String sql) |
Yes |
prepareCall(String sql) |
Yes |
prepareCall(String sql, int resultSetType, int resultSetConcurrency) |
Yes |
prepareStatement(String sql) |
Yes |
prepareStatement(String sql, int autoGeneratedKeys) |
Yes |
prepareStatement(String sql, int[ ] columnIndexes) |
Yes |
prepareStatement(String sql, String[ ] columnNames) |
Yes |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency) |
Yes |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
Yes |
rollback() |
Yes |
setAutoCommit(boolean autoCommit) |
Yes |
setCatalog(String catalog) |
Yes* |
setClientInfo(Properties properties) |
Yes |
setClientInfo(String name, String value) |
Yes |
setHoldability(int holdability) |
Yes |
setReadOnly(boolean readonly) |
No |
setTransactionIsolation(int level) |
Yes |
setTypeMap(Map map) |
Yes |
The following subsections provide a brief description of each supported Connection method.
Function: After this call, getWarnings returns null until a new warning is reported for this Connection.
Characteristic |
Description |
---|---|
Syntax |
public void clearWarnings() throws SQLException |
Function: In some cases, it is desirable to immediately release a Connection’s database and JDBC resources instead of waiting for them to be automatically released. The close method provides this immediate release.
Characteristic |
Description |
---|---|
Syntax |
public void close() throws SQLException |
Note: A Connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed Connection. |
Function: Commit makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection.
Characteristic |
Description |
---|---|
Syntax |
public void commit() throws SQLException |
Note: This method is only to be used when auto-commit is disabled. See also setAutoCommit(boolean autoCommit). |
Function: Creates an Array object populated with the given elements.
Characteristic |
Description |
---|---|
Syntax |
public Array createArrayOf(String typeName, Object[] elements) throws SQLException where the parameter:
|
Return |
An Array whose elements map to the specified SQL type. |
Note: This method is available beginning with Teradata Database 14.0 and Teradata JDBC Driver 14.00.00.04. |
Function: Constructs an object that implements the Blob interface. The object returned initially contains no data.
Characteristic |
Description |
---|---|
Syntax |
public Blob createBlob() throws SQLException |
Return |
An object that implements the Blob interface. |
Note: This method is supported beginning with Teradata JDBC Driver 20.00.00.43. |
Function: Constructs an object that implements the Clob interface. The object returned initially contains no data.
Characteristic |
Description |
---|---|
Syntax |
public Clob createClob() throws SQLException |
Return |
An object that implements the Clob interface. |
Note: This method is supported beginning with Teradata JDBC Driver 20.00.00.43. |
Function: Constructs an object that implements the SQLXML interface. The object returned initially contains no data.
Characteristic |
Description |
---|---|
Syntax |
public SQLXML createSQLXML() throws SQLException |
Return |
An object that implements the SQLXML interface. |
Note: This method is supported beginning with Teradata Database 14.10 and Teradata JDBC Driver 14.00.00.19. JDK 6.0 or later is required to use SQLXML functionality. |
Function: Creates a Statement object for sending SQL statements to the database.
Characteristic |
Description |
---|---|
Syntax |
public Statement createStatement() throws SQLException |
Return |
A new statement object is returned. |
Note: SQL statements without parameters are normally executed using statement objects. If the same SQL statement is executed many times, it is more efficient to use a prepared statement. |
Function: Creates a statement object for sending SQL statements to the database. This method is the same as the createStatement() method, except that it allows the resultSetType and resultSetConcurrencyType to be overwritten.
Characteristic |
Description |
---|---|
Syntax |
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException where the parameter:
|
Return |
A new statement object is returned. |
Note: SQL statements without parameters are normally executed using statement objects. If the same SQL statement is executed many times, it is more efficient to use a prepared statement. |
Function: Creates a statement object for sending SQL statements to the database. This method is the same as the createStatement() method, except that it allows the resultSetType, resultSetConcurrency, and resultSetHoldability to be overridden.
Characteristic |
Description |
---|---|
Syntax |
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException where the parameter:
|
Return |
A new statement object is returned. |
Note: SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it is more efficient to use a PreparedStatement. |
Function: Creates a Struct object populated with the given attributes.
Characteristic |
Description |
---|---|
Syntax |
public Struct createStruct(String typeName, Object[] attributes) throws SQLException where the parameter:
|
Return |
A Struct object that maps to the given SQL type and is populated wtih the given attributes. |
Note: This method is available beginning with Teradata Database 13.10 and Teradata JDBC Driver 13.10.00.12. |
Function: Gets the current auto-commit state.
Characteristic |
Description |
---|---|
Syntax |
public boolean getAutoCommit() throws SQLException |
Return |
Current state of auto-commit mode is returned. |
Function: Gets the current catalog name for the connection.
Characteristic |
Description |
---|---|
Syntax |
public String getCatalog() throws SQLException |
Return |
Catalog name for the connection or null is returned. |
Note: Since the database does not support catalogs, ““ is always returned. |
Function: Returns a Properties object containing the name and current value of each property currently set in the Connection query band.
Characteristic |
Description |
---|---|
Syntax |
public Properties getClientInfo() throws SQLException |
Return |
A Properties object that contains the name and value of each item in the Connection query band. This method returns an empty Properties object if no query band has been set. If the same query band name is active for multiple contexts, only one of the corresponding query band values will be returned. Transaction query band values take precedence over session query band values, which take precedence over profile query band values. |
Note: This method is supported beginning with Teradata Database 12.0 and Teradata JDBC Driver 14.00.00.33. JDK 6.0 or later is required to use this method. Profile query band values are supported beginning with Teradata Database 15.10 and Teradata JDBC Driver 15.00.00.23. |
Function: Returns the Connection query band value specified by name.
Characteristic |
Description |
---|---|
Syntax |
public String getClientInfo(String name) throws SQLException where the parameter:
|
Return |
The query band value specified by name. This method returns null if the specified name has not been set in the query band. If the same query band name is active for multiple contexts, only one of the corresponding query band values will be returned. Transaction query band values take precedence over session query band values, which take precedence over profile query band values. |
Note: This method is supported beginning with Teradata Database 12.0 and Teradata JDBC Driver 14.00.00.33. JDK 6.0 or later is required to use this method. Profile query band values are supported beginning with Teradata Database 15.10 and Teradata JDBC Driver 15.00.00.23. |
Function: Gets the result set holdability of Statement objects subsequently created using this Connection object.
Characteristic |
Description |
---|---|
Syntax |
public int getHoldability() throws SQLException |
Return |
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT |
Note: ResultSet.CLOSE_CURSORS_AT_COMMIT is supported beginning with Teradata JDBC Driver 14.00.00.28. Earlier versions of the Teradata JDBC Driver supported only ResultSet.HOLD_CURSORS_OVER_COMMIT. |
Function: A Connection’s database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is made available through a DatabaseMetaData object.
Characteristic |
Description |
---|---|
Syntax |
public DatabaseMetaData getMetaData() throws SQLException |
Return |
A DatabaseMetaData object for this Connection is returned. |
Function: Retrieves this Connection object’s current transaction isolation level.
Characteristic |
Description |
---|---|
Syntax |
public int getTransactionIsolation() throws SQLException |
Return |
Returns the current transaction isolation level, which will be one of the following constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, Connection.TRANSACTION_SERIALIZABLE, or Connection.TRANSACTION_NONE |
Function: Retrieves the Map object associated with this Connection object. Unless the application has added an entry, the type map returned will be empty.
Characteristic |
Description |
---|---|
Syntax |
public Map<String,Class<?>> getTypeMap() throws SQLException |
Return |
Returns the java.util.Map object associated with this Connection object. |
Function: Returns the first warning reported by calls on this Connection.
Characteristic |
Description |
---|---|
Syntax |
public SQLWarning getWarnings() throws SQLException |
Return |
The first SQL warning or null is returned. |
Note: Subsequent warnings will be chained to this SQL warning. |
Function: Tests to see if a Connection is closed.
Characteristic |
Description |
---|---|
Syntax |
public boolean isClosed() throws SQLException |
Return |
True, if the Connection is closed False, if the Connection is still open |
Function: Tests the connection to determine if it is in read-only mode.
Characteristic |
Description |
---|---|
Syntax |
public boolean isReadOnly() throws SQLException |
Return |
True, if the connection is read-only False, if the connection is otherwise Note: isReadOnly always returns False. |
Note: isReadOnly always returns False. |
Function: A driver may convert the JDBC SQL grammar into its system’s native SQL grammar before sending it. NativeSQL returns the native form of the statement.
Characteristic |
Description |
---|---|
Syntax |
public String nativeSQL(String sql) throws SQLException where the sql parameter is an SQL statement that may contain one or more question-mark parameter placeholders |
Return |
The native form of this statement is returned. |
Function: Creates a CallableStatement object for calling database stored procedures.
Characteristic |
Description |
---|---|
Syntax |
public CallableStatement prepareCall(String sql) throws SQLException where the sql parameter is an SQL statement that may contain one or more question-mark parameter placeholders Typically this statement is a JDBC function call escape string. |
Return |
A new CallableStatement object containing the prepared SQL statement is returned. |
Note: The CallableStatement provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure. This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done. Others may wait until the CallableStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. ResultSets created using the returned CallableStatement have forward-only type and read-only concurrence, by default. |
Function: Creates a CallableStatement object for calling database stored procedures.
Characteristic |
Description |
---|---|
Syntax |
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException where the parameter:
|
Return |
A new CallableStatement object containing the prepared SQL statement is returned. |
Note: The CallableStatement provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure. This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done. Others may wait until the CallableStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. ResultSets created using the returned CallableStatement have forward‑only type and read‑only concurrence, by default. |
Function: Creates a CallableStatement object for calling database stored procedures.
Characteristic |
Description |
---|---|
Syntax |
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException where the parameter:
|
Return |
A new CallableStatement object containing the prepared SQL statement is returned. |
Note: The CallableStatement provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure. This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done. Others may wait until the CallableStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. ResultSets created using the returned CallableStatement have forward‑only type and read‑only concurrence, by default. |
Function: Creates a PreparedStatement object for sending parameterized SQL statements to the database.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql) throws SQLException where the sql parameter is an SQL statement that may contain one or more question-mark IN parameter placeholders |
Return |
A new PreparedStatement object containing the prepared statement is returned. |
Note: An SQL statement with or without IN parameters can be prepared and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. ResultSets created using the returned PreparedStatement have forward‑only type and read‑only concurrence, by default. Connection.prepareStatement(String query) will send the query to the database for parsing. If there is an error with the query, an exception will be generated at this time (example: the table is not yet created). For earlier releases, Connection.prepareStatement(String query) only stored the query instead of sending it to the database for parsing, so no JDBC Exception is generated (example: if the table had not yet been created). |
Function: Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the indexes of the columns in the target table that contain the auto-generated keys to be made available. This array is ignored if the SQL statement is not an INSERT statement.
An SQL statement with or without IN parameters can be prepared and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.
This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException where the parameter:
|
Return |
A new PreparedStatement object, containing the prepared statement that is capable of returning the auto-generated keys designated by the given array of column indexes is returned. |
Function: Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the names of the columns in the target table that contain the auto-generated keys to be returned. This array is ignored if the SQL statement is not an INSERT statement.
An SQL statement with or without IN parameters can be prepared and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.
This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException where the parameter:
|
Return |
A new PreparedStatement object, containing the prepared statement that is capable of returning the auto-generated keys designated by the given array of column names is returned. |
Function: Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys. The given constant tells the driver whether it should make auto-generated keys available for retrieval. This parameter is ignored if the SQL statement is not an INSERT statement.
This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql, int autogeneratedKeys) throws SQLException where the parameter:
|
Return |
A new PreparedStatement object, containing the prepared SQL statement that will have the capability of returning auto-generated keys is returned. |
Note: If a database access error occurs or the given parameter is not a Statement constant indicating whether auto-generated keys should be returned, throws and SQLException. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. ResultSets created using the returned PreparedStatement have forward‑only type and read‑only concurrence, by default. |
Function: Creates a PreparedStatement object for sending parameterized SQL statements to the database.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException where the parameter:
|
Return |
A new PreparedStatement object containing the prepared statement is returned. |
Note: An SQL statement with or without IN parameters can be prepared and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. This method is optimized for handling parametric SQL statements that benefit from precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. |
Function: Creates a PreparedStatement object for sending parameterized SQL statements to the database.
Characteristic |
Description |
---|---|
Syntax |
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException where the parameter:
|
Return |
A new PreparedStatement object containing the prepared statement is returned. |
Note: A SQL statement with or without IN parameters can be prepared and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times. This method is optimized for handling parametric SQL statements that benefit from precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. Though this has no direct effect on users, it does affect which method throws certain SQLExceptions. |
Function: Drops all changes made since the previous commit/rollback and releases any database locks currently held by the Connection.
Characteristic |
Description |
---|---|
Syntax |
public void rollback() throws SQLException |
Note: This method is only to be used when auto-commit is disabled. See also setAutoCommit(boolean autoCommit). |
Function: If a Connection is in auto-commit mode, then all its SQL statements are executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by either a commit() or rollback().
By default, new connections are in auto-commit mode.
Characteristic |
Description |
---|---|
Syntax |
public void setAutoCommit(boolean autoCommit) throws SQLException where the autoCommit parameter is the enable/disable specification: True enables auto-commit False disables auto-commit |
Note: The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. Here the commit occurs when all results and output parameter values have been retrieved. |
Function: If the driver supports catalogs, this method sets a catalog name. The name selects working space in the connection’s database. If catalogs are not supported, setCatalog is ignored.
Characteristic |
Description |
---|---|
Syntax |
public void setCatalog(String catalog) throws SQLException where the catalog parameter is a catalog name |
Note: As per the standard, setCatalog is silently ignored. |
Function: Replaces the existing query band with the properties specified in properties.
Characteristic |
Description |
---|---|
Syntax |
public void setClientInfo(Properties properties) throws SQLClientInfoException where the parameter:
|
Note: If auto-commit is on, the session query band is replaced and if auto-commit is off, the transaction query band is replaced. This method is supported beginning with Teradata Database 13.10 and Teradata JDBC Driver 20.00.00.00. JDK 6.0 or later is required to use this method. Profile query band values are supported beginning with Teradata Database 15.10 and Teradata JDBC Driver 15.00.00.23. |
Function: Sets the value in the query band specified by name to the value specified by value.
Characteristic |
Description |
---|---|
Syntax |
public void setClientInfo(String name, String value) throws SQLClientInfoException where the parameter:
|
Note: If auto-commit is on, the session query band is updated and if auto-commit is off, the transaction query band is updated. This method is supported beginning with Teradata Database 13.10 and Teradata JDBC Driver 20.00.00.00. JDK 6.0 or later is required to use this method. Profile query band values are supported beginning with Teradata Database 15.10 and Teradata JDBC Driver 15.00.00.23. |
Function: Specifies the result set holdability for Statement objects subsequently created using this Connection.
Characteristic |
Description |
---|---|
Syntax |
public void setHoldability(int holdability) throws SQLException where the holdability parameter is one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT |
Note: ResultSet.CLOSE_CURSORS_AT_COMMIT is supported beginning with Teradata JDBC Driver 14.00.00.28. Earlier versions of the Teradata JDBC Driver supported only ResultSet.HOLD_CURSORS_OVER_COMMIT. Changing the result set holdability of the Connection does not change the result set holdability of existing Statement, PreparedStatement, and CallableStatement objects. Changing the result set holdability of the Connection only specifies the result set holdability for Statement, PreparedStatement, and CallableStatement objects subsequently created on that Connection using one of the Connection create/prepare methods without a holdability argument. When a Statement, PreparedStatement, or CallableStatement is created using a Connection create/prepare method having a holdability argument, then the method's holdability argument overrides the Connection's result set holdability. When auto-commit is on for the Connection, CLOSE_CURSORS_AT_COMMIT applies to result sets of Statements other than the Statement being executed. CLOSE_CURSORS_AT_COMMIT applies to query result sets, and also applies to generated-key result sets returned by the Statement.getGeneratedKeys method. A multi-statement request (MSR) can return multiple result sets. When an auto-commit or an explicit commit occurs, the Teradata JDBC Driver closes all MSR result sets with CLOSE_CURSORS_AT_COMMIT holdability for which at least one row has been received from the database. When the application subsequently calls the Statement.getMoreResults and Statement.getResultSet methods, it is possible for the Statement.getResultSet method to return a result set that is already closed. In contrast, an MSR result set will not be closed if none of its rows have been received yet from the database. |
Function: Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.
Characteristic |
Description |
---|---|
Syntax |
public void setTransactionIsolation(int level) throws SQLException where the level parameter is one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE Note: Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported. |
Note: If the requested transaction isolation level is not supported, it will be mapped to a higher, more restrictive supported transaction isolation level. The DatabaseMetaData method supportsTransactionIsolationLevel may be used to determine whether or not the driver supports a given level. |
Function: Installs the given TypeMap object as the type map for this Connection object. The type map is used for the custom mapping of SQL structured types and distinct types.
Characteristic |
Description |
---|---|
Syntax |
public void setTypeMap(Map<String,Class<?>> map) throws SQLException where the map parameter is the java.util.Map object to install as the replacement for this Connection object's default type map |
A ConnectionEventListener is an object that registers to receive events generated by a PooledConnection.
The ConnectionEventListener interface is implemented by a connection pooling component. A connection pooling component is usually provided by a JDBC driver vendor, or another system software vendor.
A ConnectionEventListener is notified by a JDBC driver when an application is finished using its Connection object. This event occurs after the application calls close on its representation of the PooledConnection.
A ConnectionEventListener is also notified when a Connection error occurs due to the fact that the PooledConnection is unfit for future use–the server has crashed, for example.
The listener is notified by the JDBC driver just before the driver throws an SQLException to the application using the PooledConnection.
Methods |
Supported |
---|---|
connectionClosed(ConnectionEvent event) |
Yes |
connectionErrorOccurred(ConnectionEvent event) |
Yes |
Function: Notifies the ConnectionEventListener when the application calls close() on its representation of the connection.
Characteristic |
Description |
---|---|
Syntax |
public void connectionClosed(ConnectionEvent event) where the event parameter is an event object describing the source of the event |
Function: Notifies the ConnectionEventListener when a fatal connection error occurs, just before an SQLException is thrown to the application.
Characteristic |
Description |
---|---|
Syntax |
public void connectionErrorOccurred(ConnectionEvent event) where the event parameter is an event object describing the source of the event. It contains the SQLException that the driver throws. |
A ConnectionPoolDataSource object is a factory for PooledConnection objects. An object that implements this interface is typically registered with a Java Naming and Directory Interface (JNDI) service.
Methods |
Supported |
---|---|
getLoginTimeout() |
Yes |
getLogWriter() |
Yes |
getMaxStatements() |
Yes |
getPooledConnection() |
Yes |
getPooledConnection(String username, String password) |
Yes |
setLoginTimeout(int seconds) |
Yes |
setLogWriter(PrintWriter out) |
Yes |
Function: Gets the maximum time, in seconds, that this connection pool data source object can wait while attempting to connect to a database.
A value of zero indicates that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
Characteristic |
Description |
---|---|
Syntax |
public int getLoginTimeout() throws SQLException |
Return |
The DataSource login timeout value is returned. |
Function: Gets the log writer for this connection pool data source object.
The log writer is a character output stream to which all logging and tracing messages for this data source object instance are printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created, the log writer is initially null; logging is disabled.
Characteristic |
Description |
---|---|
Syntax |
public PrintWriter getLogWriter() throws SQLException |
Return |
The log writer for this connection pool data source object is returned; a null if disabled. |
Function: Attempts to establish a database connection which can be used as a pooled connection.
Characteristic |
Description |
---|---|
Syntax |
public PooledConnection getPooledConnection() throws SQLException |
Return |
A pooled connection to the database is returned. |
Function: Attempts to establish a database connection which can be used as a pooled connection.
Characteristic |
Description |
---|---|
Syntax |
public PooledConnection getPooledConnection(String username, String password) throws SQLException where the parameter:
|
Return |
A Connection to the database is returned. |
Function: Sets the maximum time in seconds that this connection pool data source object will wait while attempting to connect to a database.
Characteristic |
Description |
---|---|
Syntax |
public void setLoginTimeout(int seconds) throws SQLException where the seconds parameter is the data source login time limit |
Note: Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies no timeout. When a DataSource object is created, the login timeout is initially zero. |
Function: Sets the log writer for this connection pool data source object to the java.io.PrintWriter.object.
Characteristic |
Description |
---|---|
Syntax |
public void setLogWriter(PrintWriter out) throws SQLException where the out parameter is the new log writer; to disable logging, set to null |
Return |
The log writer for this data source is returned; a null if disabled. |
Note: The log writer is a character output stream to which all logging and tracing messages for this data source object instance are printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created, the log writer is initially null; logging is disabled. |
The DatabaseMetaData interface provides information about the database as a whole. Many DatabaseMetaData methods return a list of information as a ResultSet. Use the normal ResultSet methods such as getString and getInt to retrieve the returned information.
Some kinds of metadata are not available from the database, and an empty ResultSet will be returned from those methods. A SQLException is thrown from methods that are unsupported by the Teradata JDBC Driver.
Many DatabaseMetaData methods have arguments to specify LIKE-predicate patterns to match object names. These method arguments have a name ending in the word Pattern, such as schemaPattern and tableNamePattern. If a search pattern argument is set to a null, that argument's criteria is to be dropped from the search. Within a pattern, the percent-sign character " % " is a wildcard that matches any sequence of zero or more characters, and the underscore character " _ " is a wildcard that matches any single character. To match a literal wildcard character in an object name, the wildcard character must be escaped (preceded) by a backslash character " \ ".
Beginning with Teradata JDBC Driver version 15.10.00.14, the LITERAL_UNDERSCORE=ON connection parameter will automatically escape all unescaped underscore characters in DatabaseMetaData method pattern arguments.
Methods |
Supported |
---|---|
allProceduresAreCallable() |
Yes |
allTablesAreSelectable() |
Yes |
dataDefinitionCausesTransactionCommit() |
Yes |
dataDefinitionIgnoredInTransactions() |
Yes |
deletesAreDetected(int type) |
Yes |
doesMaxRowSizeIncludeBlobs() |
Yes |
getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) |
Yes |
getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) |
Yes |
getCatalogs() |
Yes* |
getCatalogSeparator() |
Yes* |
getCatalogTerm() |
Yes* |
getClientInfoProperties() |
Yes |
getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) |
Yes |
getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) |
Yes |
getConnection() |
Yes |
getCrossReference(String primaryCatalog, String primarySchemaPattern, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) |
Yes |
getDatabaseMajorVersion() |
Yes |
getDatabaseMinorVersion() |
Yes |
getDatabaseProductName() |
Yes |
getDatabaseProductVersion() |
Yes |
getDefaultTransactionIsolation() |
Yes |
getDriverMajorVersion() |
Yes |
getDriverMinorVersion() |
Yes |
getDriverName() |
Yes |
getDriverVersion() |
Yes |
getExportedKeys(String catalog, String schema, String table) |
Yes |
getExtraNameCharacters() |
Yes |
getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) |
Yes |
getFunctions(String catalog, String schemaPattern, String functionNamePattern) |
Yes |
getIdentifierQuoteString() |
Yes |
getImportedKeys(String catalog, String schema, String table) |
Yes |
getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) |
Yes |
getMaxBinaryLiteralLength() |
Yes |
getMaxCatalogNameLength() |
Yes* |
getMaxCharLiteralLength() |
Yes |
getMaxColumnNameLength() |
Yes |
getMaxColumnsInGroupBy() |
Yes |
getMaxColumnsInIndex() |
Yes |
getMaxColumnsInOrderBy() |
Yes |
getMaxColumnsInSelect() |
Yes |
getMaxColumnsInTable() |
Yes |
getMaxConnections() |
Yes |
getMaxCursorNameLength() |
Yes |
getMaxIndexLength() |
Yes |
getMaxProcedureNameLength() |
Yes |
getMaxRowSize() |
Yes |
getMaxSchemaNameLength() |
Yes |
getMaxStatementLength() |
Yes |
getMaxStatements() |
Yes |
getMaxTableNameLength() |
Yes |
getMaxTablesInSelect() |
Yes |
getMaxUserNameLength() |
Yes |
getNumericFunctions() |
Yes |
getPrimaryKeys(String catalog, String schema, String table) |
Yes |
getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) |
Yes |
getProcedures(String catalog, String schemaPattern, String procedureNamePattern) |
Yes |
getProcedureTerm() |
Yes |
getResultSetHoldability() |
Yes |
getSchemas() |
Yes |
getSchemas(String catalog, String schemaPattern) |
Yes |
getSchemaTerm() |
Yes |
getSearchStringEscape() |
Yes |
getSQLKeywords() |
Yes |
getSQLStateType() |
Yes |
getStringFunctions() |
Yes |
getSuperTables(String, String, String) |
Yes |
getSuperTypes(String, String, String) |
Yes |
getSystemFunctions() |
Yes |
getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) |
Yes |
getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) |
Yes |
getTableTypes() |
Yes |
getTimeDateFunctions() |
Yes |
getTypeInfo() |
Yes |
getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) |
Yes |
getURL() |
Yes |
getUserName() |
Yes |
getVersionColumns(String catalog, String schema, String table) |
Yes |
insertsAreDetected(int type) |
Yes |
isCatalogAtStart() |
Yes* |
isReadOnly() |
Yes |
locatorsUpdateCopy() |
Yes |
nullPlusNonNullIsNull() |
Yes |
nullsAreSortedAtEnd() |
Yes |
nullsAreSortedAtStart() |
Yes |
nullsAreSortedHigh() |
Yes |
nullsAreSortedLow() |
Yes |
othersDeletesAreVisible(int type) |
Yes* |
othersInsertsAreVisible(int type) |
Yes* |
othersUpdatesAreVisible(int type) |
Yes* |
ownDeletesAreVisible(int type) |
Yes* |
ownInsertsAreVisible(int type) |
Yes* |
ownUpdatesAreVisible(int type) |
Yes* |
storesLowerCaseIdentifiers() |
Yes |
storesLowerCaseQuotedIdentifiers() |
Yes |
storesMixedCaseIdentifiers() |
Yes |
storesMixedCaseQuotedIdentifiers() |
Yes |
storesUpperCaseIdentifiers() |
Yes |
storesUpperCaseQuotedIdentifiers() |
Yes |
supportsAlterTableWithAddColumn() |
Yes |
supportsAlterTableWithDropColumn() |
Yes |
supportsANSI92EntryLevelSQL() |
Yes |
supportsANSI92FullSQL() |
Yes |
supportsANSI92IntermediateSQL() |
Yes |
supportsBatchUpdates() |
Yes |
supportsCatalogsInDataManipulation() |
Yes |
supportsCatalogsInIndexDefinitions() |
Yes |
supportsCatalogsInPrivilegeDefinitions() |
Yes |
supportsCatalogsInProcedureCalls() |
Yes |
supportsCatalogsInTableDefinitions() |
Yes |
supportsColumnAliasing() |
Yes |
supportsConvert() |
Yes |
supportsConvert(int fromType, toType) |
Yes |
supportsCoreSQLGrammar() |
Yes |
supportsCorrelatedSubqueries() |
Yes |
supportsDataDefinitionAndDataManipulationTransactions() |
Yes |
supportsDataManipulationTransactionsOnly() |
Yes |
supportsDifferentTableCorrelationNames() |
Yes |
supportsExpressionsInOrderBy() |
Yes |
supportsExtendedSQLGrammar() |
Yes |
supportsFullOuterJoins() |
Yes |
supportsGeneratedKeys() |
Yes |
supportsGroupBy() |
Yes |
supportsGroupByBeyondSelect() |
Yes |
supportsGroupByUnrelated() |
Yes |
supportsIntegrityEnhancementFacility() |
Yes |
supportsLikeEscapeClause() |
Yes |
supportsLimitedOuterJoins() |
Yes |
supportsMinimumSQLGrammar() |
Yes |
supportsMixedCaseIdentifiers() |
Yes |
supportsMixedCaseQuotedIdentifiers() |
Yes |
supportsMultipleResultSets() |
Yes |
supportsMultipleTransactions() |
Yes |
supportsNonNullableColumns() |
Yes |
supportsOpenCursorsAcrossCommit() |
Yes |
supportsOpenCursorsAcrossRollback() |
Yes |
supportsOpenStatementsAcrossCommit() |
Yes |
supportsOpenStatementsAcrossRollback() |
Yes |
supportsOrderByUnrelated() |
Yes |
supportsOuterJoins() |
Yes |
supportsPositionedDelete() |
Yes |
supportsPositionedUpdate() |
Yes |
supportsResultSetConcurrency(int type, int concurrency) |
Yes |
supportsResultSetHoldability(int holdability) |
Yes |
supportsResultSetType(int type) |
Yes |
supportsSchemasInDataManipulation() |
Yes |
supportsSchemasInIndexDefinitions() |
Yes |
supportsSchemasInPrivilegeDefinitions() |
Yes |
supportsSchemasInProcedureCalls() |
Yes |
supportsSchemasInTableDefinitions() |
Yes |
supportsSelectForUpdate() |
Yes |
supportsStoredProcedures() |
Yes |
supportsSubqueriesInComparisons() |
Yes |
supportsSubqueriesInExists() |
Yes |
supportsSubqueriesInIns() |
Yes |
supportsSubqueriesInQuantifieds() |
Yes |
supportsTableCorrelationNames() |
Yes |
supportsTransactionIsolationLevel(int level) |
Yes |
supportsTransactions() |
Yes |
supportsUnion() |
Yes |
supportsUnionAll() |
Yes |
updatesAreDetected(int type) |
Yes* |
usesLocalFilePerTable() |
Yes |
usesLocalFiles() |
Yes |
The following subsections provide a brief description of each supported DatabaseMetaData method.
Function: Determines if all of the procedures returned by getProcedures can be called by the current user.
Characteristic |
Description |
---|---|
Syntax |
public boolean allProceduresAreCallable() throws SQLException |
Return |
True, if all of the procedures returned by getProcedures can be called by the current user False, if they cannot be called by the current user |
Function: Determines if all the tables returned by getTable can be selected by the current user.
Characteristic |
Description |
---|---|
Syntax |
public boolean allTablesAreSelectable() throws SQLException |
Return |
True, if all of the tables returned by getTable can be selected by the current user False, if they cannot be selected by the current user |
Function: Determines if a data definition statement within a transaction forces the transaction to commit.
Characteristic |
Description |
---|---|
Syntax |
public boolean dataDefinitionCausesTransactionCommit() throws SQLException |
Return |
True, if a data definition statement within a transaction forces the transaction to commit False, if a data definition statement within a transaction does not force the transaction to commit |
Function: Determines if a data definition statement within a transaction is ignored.
Characteristic |
Description |
---|---|
Syntax |
public boolean dataDefinitionIgnoredInTransactions() throws SQLException |
Return |
True, if a data definition statement within a transaction is ignored False, if a data definition statement within a transaction is not ignored |
Function: Determines if a visible row delete can be detected by calling ResultSet.rowDeleted().
If deletesAreDetected() returns false, then deleted rows are removed from the ResultSet.
Characteristic |
Description |
---|---|
Syntax |
public boolean deletesAreDetected(int type) throws SQLException |
Return |
True, if changes are detected by the resultset type False, if changes are not detected by the resultset type |
Function: Determines if getMaxRowSize() includes LONGVARCHAR and LONGVARBINARY Blobs.
Characteristic |
Description |
---|---|
Syntax |
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException |
Return |
True, if getMaxRowSize() includes LONGVARCHAR and LONGVARBINARY Blobs False, if getMaxRowSize() does not include LONGVARCHAR and LONGVARBINARY Blobs |
Function: Retrieves a description of the given attribute of the given type for a user‑defined type (UDT) that is available in the given schema and catalog.
Descriptions are returned only for attributes of UDTs matching the catalog, schema, type, and attribute name criteria. They are ordered by:
This description does not contain inherited attributes.
Each column description includes:
Column |
Description |
---|---|
TYPE_CAT String |
Type catalog (may be null) |
TYPE_SCHEM String |
Type schema (may be null) |
TYPE_NAME String |
Type name |
ATTR_NAME String |
Attribute name |
DATA_TYPE int |
Attribute type SQL type from java.sql.Types |
ATTR_TYPE_NAME String |
Data source dependent type name. For a UDT, the type name is fully qualified. For a REF, the type name is fully qualified and represents the target type of the reference type. |
ATTR_SIZE int |
Column size. For char or date types, this is the maximum number of characters. For numeric or decimal types, this is precision. |
DECIMAL_DIGITS int |
The number of fractional digits |
NUM_PREC_RADIX int |
Radix (typically either 10 or 2) |
NULLABLE int |
Is NULL allowed?
|
REMARKS String |
Comment describing column (may be null) |
ATTR_DEF String |
Default value (may be null) |
SQL_DATA_TYPE int |
Not used |
SQL_DATETIME_SUB int |
Not used |
CHAR_OCTET_LENGTH int |
For char types, the maximum number of bytes in the column |
ORDINAL_POSITION int |
Index of column in table (starting at 1) |
IS_NULLABLE String |
NO–the column definitely does not allow NULL values Yes–the column might allow NULL values. An empty string means unknown. |
SCOPE_CATALOG String |
Catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF) |
SCOPE_SCHEMA String |
Schema of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF) |
SCOPE_TABLE String |
Source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF) |
SOURCE_DATA_TYPE short |
Source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet–each row is an attribute description |
Function: Retrieves a description of a table’s optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.
Each column description includes:
Column |
Description |
---|---|
SCOPE Short |
Actual scope of results:
|
COLUMN_NAME String |
Column name |
DATA_TYPE int |
SQL data type from java.sql.Types |
TYPE_NAME String |
Data source dependent type name. For a UDT, the type name is fully qualified. |
COLUMN_SIZE int |
Precision |
BUFFER_LENGTH int |
Is not used |
DECIMAL_DIGITS short |
Scale |
PSEUDO_COLUMN short |
|
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException where the parameter:
|
Return |
ResultSet–each row is a column description |
Function: Determines the catalog names available in the database.
Each catalog description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog name |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getCatalogs() throws SQLException |
Return |
The results are ordered by catalog name. Each row has a single String column that is a catalog name. |
Note: Currently returns a null. Will be changed in a future release to return an empty result set. |
Function: Determines the separator string between catalog and table name.
Characteristic |
Description |
---|---|
Syntax |
public String getCatalogSeparator() throws SQLException |
Return |
The separator string between catalog and table name is returned. Note: Always returns a "". Catalogs are not supported on the database. |
Note: Always returns a "". Catalogs are not supported on the database. |
Function: Determines the preferred vendor term for catalog.
Characteristic |
Description |
---|---|
Syntax |
public String getCatalogTerm() throws SQLException |
Return |
The preferred vendor term for catalog is returned. Note: Always returns a ““. Catalogs are not supported on the database. |
Note: Always returns a ““. Catalogs are not supported on the database. |
Function: Retrieves a list of the client info properties that correspond to Query Band names recommended for use with the database. Supported with the combination of JDK 6.0 or later, Teradata Database 14.00 or later, and Teradata JDBC Driver 13.10.00.12 or later.
The results are ordered by NAME.
Each client info property description includes:
Column |
Description |
---|---|
NAME String |
The name of the client info property, corresponding to the Query Band name |
MAX_LEN int |
The maximum length of the value for the property |
DEFAULT_VALUE String |
The default value of the property |
DESCRIPTION String |
A description of the property. This typically contains information as to where this property is stored in the database. |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getClientInfoProperties() throws SQLException |
Return |
ResultSet–each row is a supported client info property |
Function: Retrieves a description of the access rights for a table’s columns.
Only privileges matching the column name criteria are returned. They are ordered by:
Each privilege description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
COLUMN_NAME String |
Column name |
GRANTOR String |
Grantor of access (may be null) |
GRANTEE String |
Grantee of access |
PRIVILEGE String |
Name of access (SELECT, INSERT, UPDATE, REFRENCES, and so on) |
IS_GRANTABLE String |
YES if grantee is permitted to grant to others; NO if not; null if unknown |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet–each row is a column privilege description |
Note: See also the method getSearchStringEscape(). |
Function: Gets a description of table columns available in the specified catalog.
Only column descriptions matching the catalog, schema, table, and column name criteria are returned. They are ordered by:
Each column description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
COLUMN_NAME String |
Column name |
DATA_TYPE int |
SQL type from java.sql.Types |
TYPE_NAME String |
Data source dependent type name. For a UDT, the type name is fully qualified. |
COLUMN_SIZE int |
Column size. For char or date types, this is the maximum number of characters. For numeric or decimal types, this is precision. |
BUFFER_LENGTH |
Is not used |
DECIMAL_DIGITS int |
The number of fractional digits |
NUM_PREC_RADIX int |
Radix (typically either 10 or 2) |
NULLABLE int |
|
REMARKS String |
Comment describing column (may be null) |
COLUMN_DEF String |
Default value (may be null) |
SQL_DATA_TYPE int |
Not used |
SQL_DATETIME_SUB int |
Not used |
CHAR_OCTET_LENGTH int |
For char types, the maximum number of bytes in the column |
ORDINAL_POSITION int |
Index of column in table (starting at 1) |
IS_NULLABLE String |
NO–the column definitely does not allow NULL values YES–the column might allow NULL values; an empty string means unknown |
SCOPE_CATALOG String |
Catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn’t REF) |
SCOPE_SCHEMA String |
Schema of table that is the scope of a reference attribute (null if DATA_TYPE isn’t REF) |
SCOPE_TABLE String |
Table name that is the scope of a reference attribute (null if the DATA_TYPE isn't REF) |
SOURCE_DATA_TYPE short |
Source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn’t DISTINCT or user-generated REF) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet with each row providing a column description |
Note: See also the method getSearchStringEscape(). |
Function: Retrieves the connection that produced this metadata object.
Characteristic |
Description |
---|---|
Syntax |
public Connection getConnection() throws SQLException |
Return |
The connection that produced this metadata object is returned. |
Function: Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key columns of the given primary key table (describe how one table imports another’s key).
This normally returns a single foreign key/primary key pair because most tables import a foreign key from a table only once.
They are ordered by:
Each column description includes:
Column |
Description |
---|---|
PKTABLE_CAT String |
Primary key table catalog (may be null) |
PKTABLE_SCHEM String |
Primary key table schema (may be null) |
PKTABLE_NAME String |
Primary key table name |
PKCOLUMN_NAME String |
Primary key column name |
FKTABLE_CAT String |
Foreign key table catalog (may be null) being exported (may be null) |
FKTABLE_SCHEM String |
Foreign key table schema (may be null) being exported (may be null) |
FKTABLE_NAME String |
Foreign key column name being exported |
FKCOLUMN_NAME String |
Foreign key column name being exported |
KEY_SEQ short |
Sequence number within foreign key |
UPDATE_RULE short |
What happens to foreign key when primary is updated:
|
DELETE_RULE short |
What happens to the foreign key when primary is deleted:
|
FK_NAME String |
Foreign key name (may be null) |
PK_NAME String |
Primary key name (may be null) |
DEFERRABILITY short |
Can the evaluation of foreign key constraints be deferred until commit:
|
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException where the parameter:
|
Return |
ResultSet–each row is a foreign key column description |
Note: See also the getImportedKeys(String, String, String) method. |
Function: Retrieves the major version number of the underlying database.
Characteristic |
Description |
---|---|
Syntax |
public int getDatabaseMajorVersion() |
Returns |
The underlying database’s major version is returned. |
Note: The major version is the value following the letter V for supported database releases prior to 12.0, such as it returns value 2 for database release V2R6, but it returns value 12 for database release 12.0. |
Function: Retrieves the minor version number of the underlying database.
Characteristic |
Description |
---|---|
Syntax |
public int getDatabaseMinorVersion() |
Return |
The underlying database’s minor version is returned. |
Note: The minor version is the value following the letter R for supported database releases prior to 12.0, such as it returns value 6 for database release V2R6, but it returns value 0 for database release 12.0. |
Function: Determines the name of this database product.
Characteristic |
Description |
---|---|
Syntax |
public String getDatabaseProductName() throws SQLException |
Return |
The database product name is returned. |
Function: Determines the version of this database product.
Characteristic |
Description |
---|---|
Syntax |
public String getDatabaseProductVersion() throws SQLException |
Return |
The database version is returned. |
Note: The database version is a string that always begins with Teradata Database and that includes V2R for supported database releases prior to 12.0, but does not include V2R for 12.0. |
Function: Determines the default transaction isolation level of the database
Characteristic |
Description |
---|---|
Syntax |
public int getDefaultTransactionIsolation() throws SQLException |
Return |
The default isolation level is returned. |
Note: The values are defined in java.sql.Connection. |
Function: Determines this JDBC Driver’s major version number.
Characteristic |
Description |
---|---|
Syntax |
public int getDriverMajorVersion() |
Return |
The JDBC Driver major version number is returned. |
Function: Determines this JDBC Driver’s minor version number
Characteristic |
Description |
---|---|
Syntax |
public int getDriverMinorVersion() |
Return |
The JDBC Driver minor version number is returned. |
Function: Determines the name of this JDBC Driver.
Characteristic |
Description |
---|---|
Syntax |
public String getDriverName() throws SQLException |
Return |
The JDBC Driver name is returned. |
Function: Determines the version of this JDBC Driver.
Characteristic |
Description |
---|---|
Syntax |
public String getDriverVersion() throws SQLException |
Return |
The JDBC Driver version is returned. |
Function: Gets all the extra characters that can be used in unquoted identifier names; those beyond a-z, A-Z, 0-9, and _.
Characteristic |
Description |
---|---|
Syntax |
public String getExtraNameCharacters() throws SQLException |
Return |
The string containing extra characters is returned. |
Function: Gets a description of function parameters, return types, and columns, available in the specified catalog.
Only descriptions matching the catalog, schema, function, and column name criteria are returned. They are ordered by:
Each description includes:
Column |
Description |
---|---|
FUNCTION_CAT String |
Function catalog (may be null) |
FUNCTION_SCHEM String |
Function schema (may be null) |
FUNCTION_NAME String |
Function name |
COLUMN_NAME String |
Parameter, return type, or column name |
COLUMN_TYPE short |
|
DATA_TYPE int |
SQL type from java.sql.Types |
TYPE_NAME String |
Data source dependent type name. For a UDT, the type name is fully qualified. |
PRECISION int |
Numeric precision |
LENGTH int |
Parameter, return type, or column length |
SCALE short |
The number of fractional digits |
RADIX short |
Radix (typically either 10 or 2) |
NULLABLE short |
|
REMARKS String |
Comment describing parameter, return type, or column (may be null) |
CHAR_OCTET_LENGTH int |
Parameter, return type, or column length |
ORDINAL_POSITION int |
Ordinal position, starting from 1, of the parameter or column, or 0 for a return type |
IS_NULLABLE String |
NO - forbids NULL values YES - allows NULL values empty string - unknown nullability |
SPECIFIC_NAME String |
Unique function name that may differ from FUNCTION_NAME for an overloaded function |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet with each row providing a parameter description, column description, or return type description |
Note: This method is supported beginning with Teradata JDBC Driver 15.10.00.28. JDK 6.0 or later is required to use this method. See also the method getSearchStringEscape(). |
Function: Gets a description of functions available in the specified catalog.
Only functions matching the catalog, schema, and function name criteria are returned. They are ordered by:
Each description includes:
Column |
Description |
---|---|
FUNCTION_CAT String |
Function catalog (may be null) |
FUNCTION_SCHEM String |
Function schema (may be null) |
FUNCTION_NAME String |
Function name |
REMARKS String |
Comment describing the function (may be null) |
FUNCTION_TYPE short |
|
SPECIFIC_NAME String |
Unique function name that may differ from FUNCTION_NAME for an overloaded function |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet with each row providing a function description |
Note: This method is supported beginning with Teradata JDBC Driver 15.10.00.28. JDK 6.0 or later is required to use this method. See also the method getSearchStringEscape(). |
Function: Determines the string used to quote SQL identifiers.
Characteristic |
Description |
---|---|
Syntax |
public String getIdentifierQuoteString() throws SQLException |
Return |
If identifier quoting is supported, it returns the string used to quote SQL identifiers; If identifier quoting is not supported, a space is returned |
Note: A JDBC-compliant driver always uses a double-quote character. |
Function: Gets a description of the indices and statistics for a table.
They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
Each index column description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
NON_UNIQUE String |
Can index values be non-unique? False when TYPE is tableIndexStatistic |
INDEX_QUALIFIER String |
Index catalog (may be null), null when TYPE is tableIndexStatistic. Teradata JDBC Driver 14.00.00.25 and later, in conjunction with Teradata Database 14.10 and later, provide the database name of join and hash indexes. |
INDEX_NAME String |
Index Name. null when TYPE is tableIndexStatistic, or when the index is unnamed. Teradata permits unnamed indices; refer to the Teradata SQL Reference Data Definition Statements for more information. |
TYPE short |
Index Type:
|
ORDINAL_POSITION short |
Column sequence number within index. Zero when TYPE is tableIndexStatistic. |
COLUMN_NAME String |
Column Name. Null when TYPE is tableIndexStatistic. |
ASC_OR_DESC String |
Column sort sequence:
May be null if sort sequence is not supported. Null when TYPE is tableIndexStatistic. |
CARDINALITY int |
When TYPE is tableIndexStatistic, this is the number of rows in the table. Otherwise, it is the number of unique values in the Index. |
PAGES int |
When TYPE is tableIndexStatistic, this is the number of pages used for the table. Otherwise, it is the number of pages used for the current index. Teradata JDBC Driver 14.00.00.24 and later provide null. |
FILTER_CONDITION String |
Filter conditions, if any (may be null) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException where the parameter:
|
Return |
ResultSet–each row is an index column description |
Function: Determines how many hex characters are permitted in an in line binary literal.
Characteristics |
Description |
---|---|
Syntax |
public int getMaxBinaryLiteralLength() throws SQLException |
Return |
The maximum binary literal length in hex characters is returned. |
Note: A result of zero indicates that there is no limit to the binary literal or the limit is unknown. |
Function: Determines the maximum length of a catalog name.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxCatalogNameLength() throws SQLException |
Return |
The maximum catalog name length in bytes is returned. |
Note: A result of zero indicates that there is no limit to the catalog name or the limit is unknown. |
Function: Determines the maximum length for a character literal.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxCharLiteralLength() throws SQLException |
Return |
The maximum literal length is returned. |
Note: A result of zero indicates that there is no limit to the Character literal or the limit is unknown. |
Function: Determines the limit on column name length.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnNameLength() throws SQLException |
Return |
The maximum literal length for a column name is returned. |
Function: Determines the maximum number of columns in a GROUP BY clause.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnsInGroupBy() throws SQLException |
Return |
The maximum number of columns in a GROUP BY clause is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum number of columns allowed in an index.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnsInIndex() throws SQLException |
Return |
The maximum number of columns allowed in an index is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum number of columns allowed in an ORDER BY clause.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnsInOrderBy() throws SQLException |
Return |
The maximum number of columns allowed in an ORDER BY clause is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum number of columns allowed in a SELECT list.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnsInSelect() throws SQLException |
Return |
The maximum number of columns allowed in a SELECT list is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum number of columns allowed in a table.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxColumnsInTable() throws SQLException |
Return |
The maximum number of columns allowed in a table is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines how many active connections are allowed at a time to this database.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxConnections() throws SQLException |
Return |
The maximum active connections allowed at a time to this database is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum cursor name length in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxCursorNameLength() throws SQLException |
Return |
The maximum cursor name length in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of an index in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxIndexLength() throws SQLException |
Return |
The maximum length of an index in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of a procedure name.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxProcedureNameLength() throws SQLException |
Return |
The maximum procedure name length in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of a single row in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxRowSize() throws SQLException |
Return |
The maximum length of a single row in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length allowed for a schema name in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxSchemaNameLength() throws SQLException |
Return |
The maximum length allowed for a schema name in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of an SQL statement in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxStatementLength() throws SQLException |
Return |
The maximum length of an SQL statement in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines how many active statements can be open at any one time.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxStatements() throws SQLException |
Return |
The maximum number of active statements allowed at one time is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of a table name in bytes.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxTableNameLength() throws SQLException |
Return |
The maximum length of a table name in bytes is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum number of tables in a SELECT statement.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxTablesInSelect() throws SQLException |
Return |
The maximum number of tables allowed in a SELECT statement is returned. |
Note: A result of zero indicates that there is no limit or the limit is unknown. |
Function: Determines the maximum length of a user name.
Characteristic |
Description |
---|---|
Syntax |
public int getMaxUserNameLength() throws SQLException |
Return |
The maximum user name length in bytes is returned. |
Note: Zero indicates that there is no limit or the limit is not known. |
Function: Gets a comma-separated list of the X/Open CLI math function names in JDBC function escape clauses.
Characteristic |
Description |
---|---|
Syntax |
public String getNumericFunctions() throws SQLException |
Return |
The list of math functions is returned. |
Function: Gets a description of a table’s primary key columns. They are ordered by COLUMN_NAME.
Each primary key column description has the following columns:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
COLUMN_NAME String |
Column name |
KEY_SEQ short |
Sequence number within primary key |
PK_NAME String |
Primary key name (may be null) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException where the parameter:
|
Return |
ResultSet–each row is a primary key column description |
Function: Gets a description of the stored procedure parameters and result columns of a catalog.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException where the parameter:
|
Return |
Descriptions matching the schema, procedure, and parameter name criteria, ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. |
The column descriptions follow in column number order.
Each row in the ResultSet is a parameter description or column description with the following fields:
Column |
Description |
---|---|
PROCEDURE_CAT String |
Procedure catalog (may be null) |
PROCEDURE_SCHEM String |
Procedure schema (may be null) |
PROCEDURE_NAME String |
Procedure name |
COLUMN_NAME String |
Column/parameter name |
COLUMN_TYPE short |
Type of column parameter:
|
DATA_TYPE int |
SQL type from java.sql.Types |
TYPE_NAME String |
SQL type name; for a UDT type, the type name is fully qualified |
PRECISION int |
Precision |
LENGTH int |
Length in bytes of data |
SCALE short |
Scale |
RADIX short |
Radix |
NULLABLE short |
Can it contain NULL?
|
REMARKS String |
Comment describing parameter/column |
Note: Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database. |
Function: Gets a description of the stored procedures available in a catalog.
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException where the parameter:
|
Return |
ResultSet where each row is a procedure description, ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. |
Each procedure description has the following columns:
Column |
Description |
---|---|
PROCEDURE_CAT String |
Procedure catalog (may be null) |
PROCEDURE_SCHEM String |
Procedure schema (may be null) |
PROCEDURE_NAME String |
Procedure name |
Reserved |
Reserved for future use |
Reserved |
Reserved for future use |
Reserved |
Reserved for future use |
REMARKS String |
Explanatory comment on the procedure |
PROCEDURE_TYPE short |
Type of procedure:
|
Function: Determines the database vendor preferred term for procedure.
Characteristic |
Description |
---|---|
Syntax |
public String getProcedureTerm() throws SQLException |
Return |
The database vendor’s preferred term for procedure is returned. |
Function: Retrieves the default holdability of this ResultSet object.
Characteristic |
Description |
---|---|
Syntax |
public int getResultSetHoldability() throws SQLException |
Return |
The default holdability: ResultSet_HOLD_CURSORS_OVER_COMMIT is returned. |
Function: Retrieves the schema names available in this database. They are ordered by TABLE_SCHEM.
Each description includes:
Column |
Description |
---|---|
TABLE_SCHEM String |
Schema name |
TABLE_CATALOG String |
Catalog (may be null) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getSchemas() throws SQLException |
Return |
ResultSet with each row providing a schema description |
Function: Retrieves the schema names available in this database.
Only schemas matching the catalog and schema name criteria are returned. They are ordered by TABLE_SCHEM.
Each description includes:
Column |
Description |
---|---|
TABLE_SCHEM String |
Schema name |
TABLE_CATALOG String |
Catalog (may be null) |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException where the parameter:
|
Return |
ResultSet with each row providing a schema description |
Note: This method is supported beginning with Teradata JDBC Driver 15.10.00.28. JDK 6.0 or later is required to use this method. See also the method getSearchStringEscape(). |
Function: Determines the term for schema that is preferred by the database vendor.
Characteristic |
Description |
---|---|
Syntax |
public String getSchemaTerm() throws SQLException |
Return |
The term for schema that is preferred by the database vendor is returned. |
Function: Gets the string that can be used to escape wildcard characters.
This is the string that can be used to escape “_” or “%” in the string pattern style catalog search parameters where:
Characteristic |
Description |
---|---|
Syntax |
public String getSearchStringEscape() throws SQLException |
Return |
The string used to escape wildcard characters is returned. |
Function: Gets a comma-separated list of all the SQL keywords in a database that are NOT also SQL92 keywords.
Characteristic |
Description |
---|---|
Syntax |
public String getSQLKeywords() throws SQLException |
Return |
The list of keywords is returned. |
Function: Gets a comma-separated list of X/Open CLI string function names used in the JDBC function escape clause.
Characteristic |
Description |
---|---|
Syntax |
public String getStringFunctions() throws SQLException |
Return |
The list of string functions is returned. |
Gets a comma-separated list of X/Open CLI system function names.
These are the X/Open CLI system function names used in the JDBC function escape clause.
Characteristic |
Description |
---|---|
Syntax |
public String getSystemFunctions() throws SQLException |
Return |
The list of system functions is returned. |
Function: Retrieves a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It is wrong to assume that this privilege applies to all columns (this may be true for some systems, but is not true for all).
Only privileges matching the schema and table name criteria are returned; ordered by:
Each table description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
GRANTOR String |
Grantor of access (may be null) |
GRANTEE String |
Grantee of access |
PRIVILEGE String |
Name of access (SELECT, INSERT, UPDATE, REFERENCES, and so on) |
IS_GRANTABLE String |
YES if grantee is permitted to grant to others; NO if not; null if unknown |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)throws SQLException where the parameter:
|
Return |
ResultSet–each row is a table privilege description |
Note: See also the method getSearchStringEscape(). |
Function: Gets a description of tables available in a catalog, ordered by:
Only table descriptions matching the catalog, schema, table name, and type criteria are returned.
Each table description includes:
Column |
Description |
---|---|
TABLE_CAT String |
Table catalog (may be null) |
TABLE_SCHEM String |
Table schema (may be null) |
TABLE_NAME String |
Table name |
TABLE_TYPE String |
Table type. Typical types are:
|
REMARKS String |
Explanatory comment on the table |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException where the parameter:
|
Return |
ResultSet–each row is a table description |
Note: Some databases may not return information for all tables. See also the method getSearchStringEscape(). |
Function: Gets the table types available in the database system. The results are ordered by table types.
Characteristic |
Description |
---|---|
Syntax |
public getTableTypes() throws SQLException where the TABLE_TYPE String column is a table type. Typical types are:
|
Return |
A ResultSet object with each row as a single string column is a table type |
Function: Gets a comma-separated list of time and date functions.
Characteristic |
Description |
---|---|
Syntax |
public String getTimeDateFunctions() throws SQLException |
Return |
The list of time and date functions is returned. |
Function: Gets a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.
Each type description has the following columns:
Column |
Description |
---|---|
TYPE_NAME String |
Type name |
DATA_TYPE Short |
SQL data type from java.sql.Types |
PRECISION int |
Maximum precision |
LITERAL_PREFIX String |
Prefix used to quote a literal (may be null) |
LITERAL_SUFFIX String |
Suffix used to quote a literal (may be null) |
CREATE_PARAMS String |
Parameters used in creating the type (may be null) |
NULLABLE short |
Indicating whether the column can be a null”
|
CASE_SENSITIVE boolean |
True to indicate that the type is case-sensitive False indicates that it is not case-sensitive |
SEARCHABLE Short |
Indicates whether it is possible to use a WHERE clause:
|
UNSIGNED_ATTRIBUTE boolean |
True indicates the type is unsigned False indicates that it is signed |
FIXED_PREC_SCALE boolean |
True indicates the type can be a money value False indicates that the type cannot be a money value |
AUTO_INCREMENT boolean |
True indicates the type can be used for auto-increment False indicates that the type cannot be used for auto-increment |
LOCAL_TYPE_NAME String |
Localized version of type name (may be null) |
MINIMUM_SCALE short |
Minimum scale supported |
MAXIMUM_SCALE short |
Maximum scale supported |
SQL_DATA_TYPE int |
Unused |
SQL_DATETIME_SUB int |
Unused |
NUM_PREC_RADIX int |
Usually 2 or 10 |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getTypeInfo() throws SQLException |
Return |
ResultSet–each row is an SQL type description |
Function: Retrieves a description of the UDTs defined in a particular schema. UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT.
Only types matching the catalog, schema, type name, and type criteria are returned. They are ordered by:
The type name parameter may be a fully qualified name. In this case, the catalog and schemaPattern parameters are ignored.
Column |
Description |
---|---|
TYPE_CAT String |
The type’s catalog (may be null) |
TYPE_SCHEM String |
Type’s schema (may be null) |
TYPE_NAME String |
Type name |
CLASS_NAME String |
Java class name |
DATA_TYPE int |
Type value defined in java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT. |
REMARKS String |
Explanatory comment on the type |
BASE_TYPE short |
Type code of the source type of a DISTINCT type or the type that implements the user-generated reference type of the SELF_REFERENCING_COLUMN of a structured type as defined in java.sql.Types (null if DATA_TYPE is not DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED). |
Characteristic |
Description |
---|---|
Syntax |
public ResultSet getUDTs(String catalog, String schemaPattern, string typeNamePattern, int[] types) throws SQLException where the parameter:
|
Return |
ResultSet–each row describes a UDT |
Function: Determines the URL for this database.
Characteristic |
Description |
---|---|
Syntax |
public String getURL() throws SQLException |
Return |
The complete connection URL, beginning with Teradata JDBC Driver 16.00.00.28. Or return a "synthesized" URL string based on the data source property values for a connection originally created from a DataSource or ConnectionPoolDataSource, beginning with Teradata JDBC Driver 16.00.00.28. Or return the connection URL prefix, for Teradata JDBC Driver versions prior to Teradata JDBC Driver 16.00.00.28. |
Note: Beginning with Teradata JDBC Driver 16.00.00.28, the GETURL_CREDENTIALS connection parameter affects the behavior of this method.
|
Function: Determines your user name, as known to the database.
Characteristic |
Description |
---|---|
Syntax |
public String getUserName() throws SQLException |
Return |
Your database user name is returned. |
Function: Retrieves a description of a table’s columns that are automatically updated when any value in a row is updated. They are unordered.
Each column description has the following columns:
Column |
Description |
---|---|
SCOPE short |
Is not used |
COLUMN_NAME String |
Column name |
DATA_TYPE int |
SQL data type from java.sql.Types |
TYPE_NAME String |
Data source-dependent type name |
COLUMN_SIZE int |
Precision |
BUFFER_LENGTH int |
Length of column value in bytes |
DECIMAL_DIGITS short |
Scale |
PSEUDO_COLUMN short |
Determines if this is pseudo column like an Oracle ROWID:
|
Characteristic |
Description |
---|---|
Syntax |
getVersionColumns(String catalog, String schema, String table) throws SQLException where the parameter:
|
Return |
A ResultSet object in which each row is a column description is returned. |
Note: Teradata implementation for getVersionColumns is limited and gives back only an empty resultset. |
Function: Determines if a visible row insert can be detected by calling ResultSet.rowInserted().
Characteristic |
Description |
---|---|
Syntax |
public boolean insertsAreDetected(int type) throws SQLException where the parameter type is the ResultSet type, such as TYPE_XXX |
Return |
True, if changes are detected by the resultset type False, if changes are not detected by the resultset type |
Function: Determines if a catalog appears at the start of a table.
Characteristic |
Description |
---|---|
Syntax |
public boolean isCatalogAtStart() throws SQLException |
Return |
True, if the catalog appears at the start of the table False, if it does not appear at the start of the table |
Note: This method is supported by the Teradata JDBC Driver, but it is not supported by the database. Teradata will return a null result set. |
Function: Determines if the database is in read-only mode.
Characteristic |
Description |
---|---|
Syntax |
public boolean isReadOnly() throws SQLException |
Return |
True, if the database is in read-only mode False, if the database is not in read-only mode |
Function: Determines if concatenations between NULL and nonNULL values is NULL.
Characteristic |
Description |
---|---|
Syntax |
public boolean nullPlusNonNullIsNull() throws SQLException |
Return |
True, if concatenations between NULL and nonNULL values are NULL False, if concatenations between NULL and nonNULL values are not NULL |
Function: Determines if NULL values are sorted at the end, regardless of sort order.
Characteristic |
Description |
---|---|
Syntax |
public boolean nullsAreSortedAtEnd() throws SQLException |
Return |
True, if NULL values are sorted at the end, regardless of sort order False, if NULL values are not sorted at the end |
Function: Determines if NULL values are sorted at the start, regardless of sort order.
Characteristic |
Description |
---|---|
Syntax |
public boolean nullsAreSortedAtStart() throws SQLException |
Return |
True, if NULL values are sorted at the start, regardless of sort order False, if NULL values are not sorted at the start |
Function: Determines if NULL values are sorted high.
Characteristic |
Description |
---|---|
Syntax |
public boolean nullsAreSortedHigh() throws SQLException |
Return |
True, if null values are sorted high False, if null values are not sorted high |
Function: Determines if NULL values are sorted low.
Characteristic |
Description |
---|---|
Syntax |
public boolean nullsAreSortedLow() throws SQLException |
Return |
True, if NULL values are sorted low False, if null values are not sorted low |
Function: Determines if deletes made by others are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean othersDeletesAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if deletes made by others are visible for the ResultSet type False, if deletes made by others are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if inserts made by others are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean othersInsertsAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if inserts made by others are visible for the ResultSet type False, if inserts made by others are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if updates made by others are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean othersUpdatesAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if updates made by others are visible for the ResultSet type False, if updates made by others are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if the own deletes of a ResultSet are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean ownDeletesAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if deletes are visible for the ResultSet type False, if deletes are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if the own inserts of a ResultSet are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean ownInsertsAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if inserts are visible for the ResultSet type False, if inserts are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if the own updates of a ResultSet are visible.
Characteristic |
Description |
---|---|
Syntax |
public boolean ownUpdatesAreVisible(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if updates are visible for the ResultSet type False, if updates are not visible for the ResultSet type |
Note: Always returns false, because updatable ResultSets are not supported. |
Function: Determines if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in lower case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesLowerCaseIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in lower case False, if the database does not treat mixed case unquoted SQL identifiers as case-insensitive |
Function: Determines if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in lower case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesLowerCaseQuotedIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in lower case False, if the database does not treat mixed case quoted SQL identifiers as case-insensitive |
Function: Determines if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in mixed case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesMixedCaseIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in mixed case False, if the database does not treat mixed case unquoted SQL identifiers as case-insensitive |
Function: Determines if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in mixed case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesMixedCaseQuotedIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in mixed case False, if the database does not treat mixed case quoted SQL identifiers as case-insensitive |
Function: Determines if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in upper case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesUpperCaseIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case unquoted SQL identifiers as case-insensitive and stores them in upper case False, if the database does not treat mixed case unquoted SQL identifiers as case-insensitive |
Function: Determines if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in upper case.
Characteristic |
Description |
---|---|
Syntax |
public boolean storesUpperCaseQuotedIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case quoted SQL identifiers as case-insensitive and stores them in upper case False, if the database does not treat mixed case quoted SQL identifiers as case-insensitive |
Function: Determines if ALTER TABLE with add column is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsAlterTableWithAddColumn() throws SQLException |
Return |
True, if ALTER TABLE with add column is supported False, if ALTER TABLE with add column is not supported |
Function: Determines if ALTER TABLE with drop column is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsAlterTableWithDropColumn() throws SQLException |
Return |
True, if ALTER TABLE with drop column is supported False, if ALTER TABLE with drop column is not supported |
Function: Determines if the ANSI92 entry level SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsANSI92EntryLevelSQL() throws SQLException |
Return |
True if the ANSI92 entry level SQL grammar is supported |
Note: All JDBC-compliant drivers must return true. |
Function: Determines if the ANSI92 full SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsANSI92FullSQL() throws SQLException |
Return |
True, if the ANSI92 full SQL grammar is supported False, if the ANSI92 full SQL grammar is not supported |
Function: Determines if the ANSI92 intermediate SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsANSI92IntermediateSQL() throws SQLException |
Return |
True, if the ANSI92 intermediate SQL grammar is supported False, if the ANSI92 intermediate SQL grammar is not supported |
Function: Determines if the driver supports batch updates.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsBatchUpdates() throws SQLException |
Return |
True, if the driver supports batch updates False, if the driver does not support batch updates |
Function: Determines if a catalog name can be used in a data manipulation statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCatalogsInDataManipulation() throws SQLException |
Return |
True, if a catalog name can be used in a data manipulation statement False, if a catalog name cannot be used in a data manipulation statement |
Function: Determines if a catalog name can be used in an index definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCatalogsInIndexDefinitions() throws SQLException |
Return |
True, if a catalog name can be used in an index definition statement False, if a catalog name cannot be used in an index definition statement |
Function: Determines if a catalog name can be used in a privilege definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException |
Return |
True, if a catalog name can be used in a privilege definition statement False, if a catalog name cannot be used in a privilege definition statement |
Function: Determines if a catalog name can be used in a procedure call statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCatalogsInProcedureCalls() throws SQLException |
Return |
True, if a catalog name can be used in a procedure call statement False, if a catalog name cannot be used in a procedure call statement |
Function: Determines if a catalog name can be used in a table definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCatalogsInTableDefinitions() throws SQLException |
Return |
True, if a catalog name can be used in a table definition statement False, if a catalog name cannot be used in a table definition statement |
Function: Determines if column aliasing is supported. If it is supported, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsColumnAliasing() throws SQLException |
Return |
True, if column aliasing is supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if the CONVERT function between SQL types is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsConvert() throws SQLException |
Return |
True, if the CONVERT function between SQL types is supported False, if the CONVERT function between SQL types is not supported |
Function: Determines if the CONVERT function between SQL types is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsConvert(int fromType, int toType) throws SQLException where the parameter:
|
Return |
True, if the CONVERT function between SQL types is supported False, if the CONVERT function between SQL types is not supported |
Function: Determines if the ODBC Core SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCoreSQLGrammar() throws SQLException |
Return |
True, if the ODBC core SQL grammar is supported False, if the ODBC core SQL grammar is not supported |
Function: Determines if correlated subqueries are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsCorrelatedSubqueries() throws SQLException |
Return |
True, if correlated subqueries are supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if both data definition and data manipulation statements within a transaction are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException |
Return |
True, if both a data definition and data manipulation statement within a transaction are supported False, if data definition or data manipulation statements within a transaction are not supported |
Function: Determines if only data manipulation statements within a transaction are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsDataManipulationTransactionsOnly() throws SQLException |
Return |
True, if only data manipulation statements within a transaction are supported False, if only data definition statements within a transaction are also supported |
Function: If table correlation names are supported, determines if they must be different from the names of the tables.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsDifferentTableCorrelationNames() throws SQLException |
Return |
True, if supported table correlation names must be different False, if supported table correlation names need not be different |
Function: Determines if expressions in ORDER BY list are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsExpressionsInOrderBy() throws SQLException |
Return |
True, if expressions in ORDER BY lists are supported False, if expressions in ORDER BY lists are not supported |
Function: Determines if the ODBC extended SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsExtendedSQLGrammar() throws SQLException |
Return |
True, if the ODBC extended SQL grammar is supported False, if the ODBC extended SQL grammar is not supported |
Function: Determines if full nested outer joins are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsFullOuterJoins() throws SQLException |
Return |
True, if full nested outer joins are supported False, if full nested outer joins are not supported |
Function: Determines if auto-generated keys can be retrieved after a statement has been executed.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsGetGeneratedKeys() throws SQLException |
Return |
True, if auto-generated keys can be retrieved after a statement has been executed False, if otherwise |
Function: Determines if some form of GROUP BY clause is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsGroupBy() throws SQLException |
Return |
True, if some form of GROUP BY clause is supported False, if some form of GROUP BY clause is not supported |
Function: Determines if a GROUP BY clause can add columns not in the SELECT provided it specifies all the columns in the SELECT.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsGroupByBeyondSelect() throws SQLException |
Return |
True, if a GROUP BY clause can add columns not in the SELECT provided it specifies all the columns in the SELECT False, if a GROUP BY clause cannot add columns not in the SELECT |
Function: Determines if a GROUP BY clause can use columns not in the SELECT.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsGroupByUnrelated() throws SQLException |
Return |
True, if a GROUP BY clause can use columns not in the SELECT False, if a GROUP BY clause cannot use columns not in the SELECT |
Function: Determines if the SQL Integrity Enhancement Facility is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsIntegrityEnhancementFacility() throws SQLException |
Return |
True, if the facility is supported False, if the facility is not supported |
Function: Determines if the escape character in LIKE clauses is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsLikeEscapeClause() throws SQLException |
Return |
True, if the escape character in LIKE clauses is supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if there is limited support for outer joins.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsLimitedOuterJoins() throws SQLException |
Return |
True, if there is limited support for outer joins False, if there is not limited support for outer joins |
Note: This will be true if supportFullOuterJoins is true. |
Function: Determines if the ODBC minimum SQL grammar is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMinimumSQLGrammar() throws SQLException |
Return |
True, if the ODBC minimum SQL grammar is supported False, if the ODBC minimum SQL grammar is not supported |
Note: All JDBC-compliant drivers must return true. |
Function: Determines if the database treats mixed case unquoted SQL identifiers as case-sensitive and as a result stores them in mixed case.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMixedCaseIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case unquoted SQL identifiers as case-sensitive and as a result stores them in mixed case False, if the database does not treat mixed case unquoted SQL identifiers as case-sensitive |
Note: A JDBC-compliant driver will always return false. |
Function: Determines if the database treats mixed case quoted SQL identifiers as case-sensitive and as a result stores them in mixed case.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException |
Return |
True, if the database treats mixed case quoted SQL identifiers as case-sensitive and as a result stores them in mixed case False, if the database does not treat mixed case quoted SQL identifiers as case-sensitive |
Note: A JDBC-compliant driver will always return false |
Function: Determines if it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMultipleOpenResults() throws SQLException |
Return |
|
Function: Determines if multiple ResultSets from a single execute are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMultipleResultSets() throws SQLException |
Return |
True, if multiple ResultSets from a single execute are supported False, if multiple ResultSets from a single execute are not supported |
Function: Determines if multiple transactions can be open at once (on different connections).
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsMultipleTransactions() throws SQLException |
Return |
True, if multiple transactions can be open at once (on different connections) False, if multiple connections cannot be open at once (on different connections) |
Function: Determines if columns can be defined as non-nullable.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsNonNullableColumns() throws SQLException |
Return |
True, if columns can be defined as non-nullable. |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if cursors can remain open across commits.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOpenCursorsAcrossCommit() throws SQLException |
Return |
True, if cursors can remain open across commits False, if cursors cannot remain open across commits |
Function: Determines if cursors can remain open across rollbacks.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOpenCursorsAcrossRollback() throws SQLException |
Return |
True, if cursors can remain open across rollbacks False, if cursors cannot remain open across rollbacks |
Function: Determines if statements remain open across commits.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOpenStatementsAcrossCommit() throws SQLException |
Return |
True, if statements always remain open across commits False, if statements might not remain open across commits |
Function: Determines if statements can remain open across rollbacks.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOpenStatementsAcrossRollback() throws SQLException |
Return |
True, if statements always remain open across rollback False, if statements might not remain open across rollbacks |
Function: Determines if an ORDER BY clause can use columns not in the SELECT statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOrderByUnrelated() throws SQLException |
Return |
True, if an ORDER BY clause can use columns not in the SELECT statement False, if an ORDER BY clause cannot use columns not in the SELECT statement |
Function: Determines if some form of outer join is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsOuterJoins() throws SQLException |
Return |
True, if some form of outer join is supported False, if some form of outer join is not supported |
Function: Determines if positioned DELETE is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsPositionedDelete() throws SQLException |
Return |
True, if positioned DELETE is supported False, if positioned DELETE is not supported |
Function: Determines if positioned UPDATE is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsPositionedUpdate() throws SQLException |
Return |
True, if positioned UPDATE is supported False, if positioned UPDATE is not supported |
Function: Determines if the database supports the concurrency type in combination with the given ResultSet type.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException where the parameter:
|
Return |
True, if the database supports the concurrency type in combination with the ResultSet type False, if the database does not support the concurrency type in combination with the ResultSet type |
Function: Retrieves whether this database supports the given result set holdability.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsResultSetHoldability(int holdability) throws SQLException where the parameter holdability is one of the following constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT |
Returns |
|
Function: Determines if the database supports the given ResultSet type.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsResultSetType(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if the database supports the ResultSet type False, if the database does not support the ResultSet type |
Function: Determines if a schema name can be used in a data manipulation statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSchemasInDataManipulation() throws SQLException |
Return |
True, if a schema name can be used in a data manipulation statement False, if a schema name cannot be used in a data manipulation statement |
Function: Determines if a schema name can be used in an index definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSchemasInIndexDefinitions() throws SQLException |
Return |
True, if a schema name can be used in an index definition statement False, if a schema name cannot be used in an index definition statement |
Function: Determines if a schema name can be used in a privilege definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException |
Return |
True, if a schema name can be used in a privilege definition statement False, if a schema name cannot be used in a privilege definition statement |
Function: Determines if a schema name can be used in a procedure call statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSchemasInProcedureCalls() throws SQLException |
Result |
True, if a schema name can be used in a procedure call False, if a schema name cannot be used in a procedure call |
Function: Determines if a schema name can be used in a table definition statement.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSchemasInTableDefinitions() throws SQLException |
Return |
True, if a schema name can be used in a table definition statement False, if a schema name cannot be used in a table definition statement |
Function: Determines if the SELECT for UPDATE function is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSelectForUpdate() throws SQLException |
Return |
True, if the function is supported False, if the function is not supported |
Function: Determines if stored procedure calls using the stored procedure escape syntax are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsStoredProcedures() throws SQLException |
Return |
True, if stored procedure calls using the stored procedure escape syntax are supported False, if stored procedure calls using the stored procedure escape syntax are not supported |
Function: Determines if subqueries in comparison expressions are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSubqueriesInComparisons() throws SQLException |
Return |
True, if subqueries in comparison expressions are supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if subqueries in exists expressions are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSubqueriesInExists() throws SQLException |
Return |
True, if subqueries in exists expressions are supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if subqueries in in statements are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSubqueriesInIns() throws SQLException |
Return |
True, if subqueries in in statements are supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if subqueries in quantified expressions are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsSubqueriesInQuantifieds() throws SQLException |
Return |
True, if subqueries in quantified expressions are supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if table correlation names are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsTableCorrelationNames() throws SQLException |
Return |
True, if table correlation names are supported False, if table correlation names are not supported |
Note: A JDBC-compliant driver always returns true. |
Function: Determines if the database supports the given transaction isolation level.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsTransactionIsolationLevel(int level) throws SQLException where the level parameter is the value defined in the java.sql.Connection method |
Return |
True, if the database supports the transaction level False, if the database does not support the transaction level |
Function: Determines if transactions are supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsTransactions() throws SQLException |
Return |
True, if the database supports the transaction level False, if the database does not support the transaction level |
Function: Determines if SQL UNION is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsUnion() throws SQLException |
Return |
True, if SQL UNION is supported False, if SQL UNION is not supported |
Function: Determines if SQL UNION ALL is supported.
Characteristic |
Description |
---|---|
Syntax |
public boolean supportsUnionAll() throws SQLException |
Return |
True, if SQL UNION ALL is supported False, if SQL UNION ALL is not supported |
Function: Determines if a visible row update can be detected by calling the method ResultSet.rowUpdated.
Characteristic |
Description |
---|---|
Syntax |
public boolean updatesAreDetected(int type) throws SQLException where the type parameter is the ResultSet type, such as TYPE_XXX |
Return |
True, if changes are detected by the ResultSet type False, if changes are not detected by the ResultSet type |
Note: Returns False, because updatable ResultSets are not supported. |
Function: Determines if the database uses a local file for each table.
Characteristic |
Description |
---|---|
Syntax |
public boolean usesLocalFilePerTable() throws SQLException |
Return |
True, if the database uses a local file for each table False, if the database does not use a local file for each table |
Function: Determines if the database stores tables in a local file.
Characteristic |
Description |
---|---|
Syntax |
public boolean usesLocalFiles() throws SQLException |
Return |
True, if the database stores tables in a local file False, if the database does not store tables in a local file |
A DataSource object is a factory for Connection objects. An object that implements the DataSource interface is typically registered with a JNDI service provider. A JDBC driver that is accessed using the DataSource API does not automatically register itself with the DriverManager.
Methods |
Supported |
---|---|
getConnection() |
Yes |
getConnection(String username, String password) |
Yes |
getLoginTimeout() |
Yes |
getLogWriter() |
Yes |
setLoginTimeout(int seconds) |
Yes |
setLogWriter(PrintWriter out) |
Yes |
Function: Attempts to establish a database connection. The DriverManager attempts to connect to a database.
Characteristic |
Description |
---|---|
Syntax |
public Connection getConnection() throws SQLException |
Return |
A connection to a database data source is returned. |
Function: Attempts to establish a database connection. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Characteristic |
Description |
---|---|
Syntax |
public Connection getConnection(String username, String password) throws SQLException where the parameter:
|
Return |
A connection to the database data source is returned. |
Function: Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
Characteristic |
Description |
---|---|
Syntax |
public int getLoginTimeout() throws SQLException |
Return |
DataSource login timeout value is returned. |
Note: A value of zero indicates that there is no timeout. When a DataSource object is created, the login timeout is initially zero. See also: DataSource Method setLoginTimeout(int seconds). |
Function: Gets the log writer for this data source.
Characteristic |
Description |
---|---|
Syntax |
public PrintWriter getLogWriter() throws SQLException |
Return |
The log writer for this data source is returned; null if logging is disabled. |
Note: The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created, the log writer is initially null; in other words, logging is disabled. See also: DataSource Method setLogWriter(PrintWriter out). |
Function: Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
Characteristic |
Description |
---|---|
Syntax |
public void setLoginTimeout(int seconds) throws SQLException where the seconds parameter is the data source login time limit. |
Note: A value of zero specifies no timeout. When a DataSource object is created, the login timeout is initially zero. See also: DataSourceMethod getLoginTimeout(). |
Function: Sets the log writer for this data source.
Characteristic |
Description |
---|---|
Syntax |
public void setLogWriter(PrintWriter out) throws SQLException where the out parameter is the new log writer; to disable logging, set to null. |
Note: The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created, the log writer is initially null; in other words, logging is disabled. See also: DataSource Method getLogWriter(). |
The DriverManager provides a basic service for managing JDBC drivers.
A Java application loads the Teradata JDBC Driver with the following statement:
Class.forName("com.teradata.jdbc.TeraDriver");
When the DriverManager getConnection method is called, the DriverManager attempts to locate a suitable JDBC driver from among those loaded by the application.
Methods |
Supported |
---|---|
getConnection(String url) |
Yes |
getConnection(String url, Properties info) |
Yes |
getConnection(String url, String user, String password) |
Yes |
getLoginTimeout() |
Yes |
setLoginTimeout(int seconds) |
Yes |
The following subsections provide a brief description of each supported DriverManager method.
Function: Attempts to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Characteristic |
Description |
---|---|
Syntax |
public static Connection getConnection(String url) throws SQLException
|
Return |
a connection to the database |
Function: Attempts to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Characteristic |
Description |
---|---|
Syntax |
public static Connection getConnection(String url, Properties info) throws SQLException where the parameter:
|
Return |
a connection to the database |
Function: Attempts to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
Characteristic |
Description |
---|---|
Syntax |
public static Connection getConnection(String url, String user, String password) throws SQLException where the parameter:
|
Return |
a connection to the database |
Function: Finds the maximum time that a driver can wait to login to the database.
Characteristic |
Description |
---|---|
Syntax |
public static int getLoginTimeout() |
Return |
The driver login time limit in seconds is returned. |
Function: Sets the maximum time that a driver will wait to connect to the database.
Characteristic |
Description |
---|---|
Syntax |
public static void setLoginTimeout(int seconds) where the seconds parameter is the time allowed to wait in seconds. |