| java.lang.Object org.apache.derbyTesting.functionTests.tests.jdbcapi.metadata_test org.apache.derbyTesting.functionTests.tests.jdbcapi.odbc_metadata
odbc_metadata | public class odbc_metadata extends metadata_test (Code) | | Test of database metadata for ODBC clients. This test does
everything that is done in "metadata.java" (which this class
extends), except that it makes the metadata calls in such a way
as to retrieve ODBC-compliant result sets. Unlike metadata.java,
this test also does a (simple) check of the metadata result sets
to see if they comply with the standards--in this case, with the
ODBC 3.0 standard as defined at this URL:
http://msdn.microsoft.com/library/default.asp?url=/library/
en-us/odbc/htm/odbcsqlprocedurecolumns.asp
The ODBC standards verification involves checking the following
for each column in each of the relevant metadata result sets:
1. Does the column name match what the spec says?
2. Does the column type match what the spec says?
3. Does the column nullability match what the spec says?
If compliance failures occur in any of these ways, an ODBC non-
compliance failure will be reported as part of the test output.
Under no circumstances should a master file for this test
contain an ODBC non-compliance message and still be considered
as "passing".
|
Constructor Summary | |
public | odbc_metadata(String[] args) Constructor:
Intializes the Connection and Statement fields
to be used through the test, and then does the
first-level check of ODBC compliance. |
Method Summary | |
protected boolean | badNullability(int odbcProc, String colName, int colNum, boolean wasNull) Takes result set metadata and sees if the
nullability of its columns match what ODBC 3.0
dictates. | protected void | checkODBCNamesAndTypes(ResultSet rs, int procId) Takes result set metadata and sees if the names
and types of its columns match what ODBC 3.0
dictates. | protected void | dumpRS(int procId, ResultSet s) Dumps a result to output and, if procId is not -1, checks
to see if the nullability of the result set values conforms
to the ODBC 3.0 specification. | protected ResultSet | getMetaDataRS(DatabaseMetaData dmd, int procId, String[] sArgs, String[] argArray, int[] iArgs, boolean[] bArgs) This method is responsible for executing a metadata query and returning
a result set that complies with the ODBC 3.0 specification. | protected void | loadODBCTargets() This is where we load the metadata result set schema
that is specified in the ODBC 3.0 spec. | public static void | main(String[] args) Makes a call to the "runTest" method in metadata_test.java,
which will in turn call back here for implementations of
the abstract methods. | protected void | verifyODBC3Compliance() This method tests to see if the result sets returned for
ODBC clients do in fact comply with the ODBC 3.0 spec.
That specification can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/
en-us/odbc/htm/odbcsqlprocedurecolumns.asp
NOTE: This method only verifies the names and types of the
columns. |
odbc_metadata | public odbc_metadata(String[] args)(Code) | | Constructor:
Intializes the Connection and Statement fields
to be used through the test, and then does the
first-level check of ODBC compliance.
|
badNullability | protected boolean badNullability(int odbcProc, String colName, int colNum, boolean wasNull)(Code) | | Takes result set metadata and sees if the
nullability of its columns match what ODBC 3.0
dictates.
|
checkODBCNamesAndTypes | protected void checkODBCNamesAndTypes(ResultSet rs, int procId) throws SQLException(Code) | | Takes result set metadata and sees if the names
and types of its columns match what ODBC 3.0
dictates.
|
dumpRS | protected void dumpRS(int procId, ResultSet s) throws SQLException(Code) | | Dumps a result to output and, if procId is not -1, checks
to see if the nullability of the result set values conforms
to the ODBC 3.0 specification.
|
getMetaDataRS | protected ResultSet getMetaDataRS(DatabaseMetaData dmd, int procId, String[] sArgs, String[] argArray, int[] iArgs, boolean[] bArgs) throws SQLException(Code) | | This method is responsible for executing a metadata query and returning
a result set that complies with the ODBC 3.0 specification.
|
loadODBCTargets | protected void loadODBCTargets()(Code) | | This is where we load the metadata result set schema
that is specified in the ODBC 3.0 spec. When we do
validation of the ODBC result set, we will compare
the actual results with the target values that we
load here.
Target lists consist of three strings for each column
in the result set. The first string is the expected
(ODBC 3.0) column name. The second string is the
expected column type. The third string is the
expected column nullability (null means that the
column is nullable; any non-null String means that
the column is NOT NULLABLE).
The target values in this method come from the following
URL:
http://msdn.microsoft.com/library/default.asp?url=/library/
en-us/odbc/htm/odbcsqlprocedurecolumns.asp
|
main | public static void main(String[] args)(Code) | | Makes a call to the "runTest" method in metadata_test.java,
which will in turn call back here for implementations of
the abstract methods.
|
verifyODBC3Compliance | protected void verifyODBC3Compliance() throws Exception(Code) | | This method tests to see if the result sets returned for
ODBC clients do in fact comply with the ODBC 3.0 spec.
That specification can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/
en-us/odbc/htm/odbcsqlprocedurecolumns.asp
NOTE: This method only verifies the names and types of the
columns. The nullability of the values is checked as part
of the dumpRS() method.
|
|
|