OptionalTool to create wrapper functions which allow you to invoke DatabaseMetaData methods via SQL. The wrapper functions slightly change the signature of the metadata methods as follows:
Methods which return ResultSet are mapped to table functions. You can join the metadata table functions like this:
-- list all of the columns in the connected Derby database
select t.table_schem, t.table_name, c.column_name, c.type_name
from table( getTables( null, null, null ) ) t,
table( getColumns( null, null, null, null ) ) c
where c.table_schem = t.table_schem
and c.table_name = t.table_name
and t.table_type = 'TABLE'
;
-- now list metadata in a foreign database
call setDatabaseURL( 'com.mysql.jdbc.Driver', 'jdbc:mysql://localhost/world?user=root&password=' );
select t.table_schem, t.table_name, c.column_name, c.type_name
from table( getTables( 'WORLD', null, null ) ) t,
table( getColumns( 'WORLD', null, null, null) ) c
where c.table_name = t.table_name
and t.table_type = 'TABLE'
;
-- release the foreign connection
call setDatabaseURL( '', '' );
| Modifier and Type | Field and Description |
|---|---|
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | |
| private void | appendArgs(StringBuffer buffer, Method method)
Append function arguments to an evolving ddl text buffer. |
| private void | appendReturnType(StringBuffer buffer, Connection conn, Method method)
Append return type to an evolving ddl text buffer |
| private void | appendTableFunctionSignature(StringBuffer buffer, Connection conn, Method method)
Append the signature of a table function to an evolving ddl text buffer |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private static void | |
| public static ResultSet | getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)
|
| public static ResultSet | |
| public static ResultSet | |
| public static String | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | |
| public static ResultSet | |
| public static ResultSet | |
| public static int | |
| public static int | |
| public static String | |
| public static String | |
| private static DatabaseMetaData | |
| private static Connection | |
| public static int | |
| public static int | |
| public static int | |
| public static String | |
| public static String | |
| private Object | |
| public static ResultSet | |
| public static String | |
| public static ResultSet | getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)
|
| public static ResultSet | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
|
| public static ResultSet | |
| public static String | |
| public static int | |
| public static ResultSet | |
| public static String | |
| public static String | |
| public static String | |
| public static int | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | |
| public static ResultSet | |
| public static String | |
| public static ResultSet | |
| public static ResultSet | |
| public static String | |
| public static String | |
| public static ResultSet | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private boolean | |
| private boolean | |
| public void | loadTool(String... configurationParameters)
Implements org. |
| public static boolean | |
| private String | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private static PreparedStatement | |
| private void | register(boolean register)
Workhorse to register or unregister all public static methods as Derby routines. |
| private void | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private void | stringifyJDBCType(StringBuffer buffer, ResultSetMetaData rsmd, int columnNumber)
Append the name of a SQL type to an evolving ddl text buffer |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public void | unloadTool(String... configurationParameters)
Implements org. |
| private void | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private static SQLException |