Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/rohanclan/ashpool/jdbc/MetaData.java


1   /*
2    * Ashpool - XML Database
3    * Copyright (C) 2003 Rob Rohan
4    * This program is free software; you can redistribute it and/or modify it
5    * under the terms of the GNU General Public License as published by the
6    * Free Software Foundation; either version 2 of the License, or (at your
7    * option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful, but
10   * WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   * General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License along
15   * with this program; if not, write to the Free Software Foundation, Inc.,
16   * 675 Mass Ave, Cambridge, MA 02139, USA.
17   *
18   * MetaData.java
19   *
20   * Created on January 31, 2003, 9:30 PM
21   */
22  
23  package com.rohanclan.ashpool.jdbc;
24  
25  import java.sql.*;
26  import com.rohanclan.ashpool.core.*;
27  /**
28   *
29   * @author  rob 
30   */
31  public class MetaData implements java.sql.DatabaseMetaData {
32      
33      /** handle to the connection */
34      private Connection conn;
35        
36      /** Creates a new instance of MetaData */
37      public MetaData() { 
38          this(null);
39      }
40      
41      public MetaData(Connection connhndl){
42          this.conn = connhndl;
43      } 
44      
45      /** Retrieves whether the current user can call all the procedures
46       * returned by the method <code>getProcedures</code>.
47       *
48       * @return <code>true</code> if so; <code>false</code> otherwise
49       * @exception SQLException if a database access error occurs
50       *
51       */
52      public boolean allProceduresAreCallable() throws SQLException {
53          return false;
54      }
55      
56      /** Retrieves whether the current user can use all the tables returned
57       * by the method <code>getTables</code> in a <code>SELECT</code>
58       * statement.
59       *
60       * @return <code>true</code> if so; <code>false</code> otherwise
61       * @exception SQLException if a database access error occurs
62       *
63       */
64      public boolean allTablesAreSelectable() throws SQLException {
65          return true;
66      }
67      
68      /** Retrieves whether a data definition statement within a transaction forces
69       * the transaction to commit.
70       *
71       * @return <code>true</code> if so; <code>false</code> otherwise
72       * @exception SQLException if a database access error occurs
73       *
74       */
75      public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
76          return false;
77      }
78      
79      /** Retrieves whether this database ignores a data definition statement
80       * within a transaction.
81       *
82       * @return <code>true</code> if so; <code>false</code> otherwise
83       * @exception SQLException if a database access error occurs
84       *
85       */
86      public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
87          return true;
88      }
89      
90      /** Retrieves whether or not a visible row delete can be detected by
91       * calling the method <code>ResultSet.rowDeleted</code>.  If the method
92       * <code>deletesAreDetected</code> returns <code>false</code>, it means that
93       * deleted rows are removed from the result set.
94       *
95       * @param type the <code>ResultSet</code> type; one of
96       *        <code>ResultSet.TYPE_FORWARD_ONLY</code>,
97       *        <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
98       *        <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
99       * @return <code>true</code> if deletes are detected by the given result set type;
100      *         <code>false</code> otherwise
101      * @exception SQLException if a database access error occurs
102      * @since 1.2
103      *
104      */
105     public boolean deletesAreDetected(int type) throws SQLException {
106         return false;
107     }
108     
109     /** Retrieves whether the return value for the method
110      * <code>getMaxRowSize</code> includes the SQL data types
111      * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
112      *
113      * @return <code>true</code> if so; <code>false</code> otherwise
114      * @exception SQLException if a database access error occurs
115      *
116      */
117     public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
118         return true;
119     }
120     
121     /** Retrieves a description of the given attribute of the given type
122      * for a user-defined type (UDT) that is available in the given schema
123      * and catalog.
124      * <P>
125      * Descriptions are returned only for attributes of UDTs matching the
126      * catalog, schema, type, and attribute name criteria. They are ordered by
127      * TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description
128      * does not contain inherited attributes.
129      * <P>
130      * The <code>ResultSet</code> object that is returned has the following
131      * columns:
132      * <OL>
133      *  <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>)
134      *   <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>)
135      *   <LI><B>TYPE_NAME</B> String => type name
136      *   <LI><B>ATTR_NAME</B> String => attribute name
137      *   <LI><B>DATA_TYPE</B> short => attribute type SQL type from java.sql.Types
138      *   <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name.
139      *  For a UDT, the type name is fully qualified. For a REF, the type name is
140      *  fully qualified and represents the target type of the reference type.
141      *   <LI><B>ATTR_SIZE</B> int => column size.  For char or date
142      *       types this is the maximum number of characters; for numeric or
143      *       decimal types this is precision.
144      *   <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
145      *   <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
146      *   <LI><B>NULLABLE</B> int => whether NULL is allowed
147      *      <UL>
148      *      <LI> attributeNoNulls - might not allow NULL values
149      *      <LI> attributeNullable - definitely allows NULL values
150      *      <LI> attributeNullableUnknown - nullability unknown
151      *      </UL>
152      *   <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
153      *   <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>)
154      *   <LI><B>SQL_DATA_TYPE</B> int => unused
155      *   <LI><B>SQL_DATETIME_SUB</B> int => unused
156      *   <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
157      *       maximum number of bytes in the column
158      *   <LI><B>ORDINAL_POSITION</B> int  => index of column in table
159      *      (starting at 1)
160      *   <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
161      *      does not allow NULL values; "YES" means the column might
162      *      allow NULL values.  An empty string means unknown.
163      *  <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the
164      *      scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
165      *  <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the
166      *      scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
167      *  <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a
168      *      reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
169      * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
170      *      Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
171      *      isn't DISTINCT or user-generated REF)
172      *  </OL>
173      * @param catalog a catalog name; must match the catalog name as it
174      *        is stored in the database; "" retrieves those without a catalog;
175      *        <code>null</code> means that the catalog name should not be used to narrow
176      *        the search
177      * @param schemaPattern a schema name pattern; must match the schema name
178      *        as it is stored in the database; "" retrieves those without a schema;
179      *        <code>null</code> means that the schema name should not be used to narrow
180      *        the search
181      * @param typeNamePattern a type name pattern; must match the
182      *        type name as it is stored in the database
183      * @param attributeNamePattern an attribute name pattern; must match the attribute
184      *        name as it is declared in the database
185      * @return a <code>ResultSet</code> object in which each row is an
186      *         attribute description
187      * @exception SQLException if a database access error occurs
188      * @since 1.4
189      *
190      */
191     public java.sql.ResultSet getAttributes(String catalog, String schemaPattern, 
192         String typeNamePattern, String attributeNamePattern) throws SQLException {
193         
194         return new com.rohanclan.ashpool.core.AResultSet();
195     }
196     
197     /** Retrieves a description of a table's optimal set of columns that
198      * uniquely identifies a row. They are ordered by SCOPE.
199      *
200      * <P>Each column description has the following columns:
201      *  <OL>
202      *   <LI><B>SCOPE</B> short => actual scope of result
203      *      <UL>
204      *      <LI> bestRowTemporary - very temporary, while using row
205      *      <LI> bestRowTransaction - valid for remainder of current transaction
206      *      <LI> bestRowSession - valid for remainder of current session
207      *      </UL>
208      *   <LI><B>COLUMN_NAME</B> String => column name
209      *   <LI><B>DATA_TYPE</B> short => SQL data type from java.sql.Types
210      *   <LI><B>TYPE_NAME</B> String => Data source dependent type name,
211      *  for a UDT the type name is fully qualified
212      *   <LI><B>COLUMN_SIZE</B> int => precision
213      *   <LI><B>BUFFER_LENGTH</B> int => not used
214      *   <LI><B>DECIMAL_DIGITS</B> short   => scale
215      *   <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column
216      *      like an Oracle ROWID
217      *      <UL>
218      *      <LI> bestRowUnknown - may or may not be pseudo column
219      *      <LI> bestRowNotPseudo - is NOT a pseudo column
220      *      <LI> bestRowPseudo - is a pseudo column
221      *      </UL>
222      *  </OL>
223      *
224      * @param catalog a catalog name; must match the catalog name as it
225      *        is stored in the database; "" retrieves those without a catalog;
226      *        <code>null</code> means that the catalog name should not be used to narrow
227      *        the search
228      * @param schema a schema name; must match the schema name
229      *        as it is stored in the database; "" retrieves those without a schema;
230      *        <code>null</code> means that the schema name should not be used to narrow
231      *        the search
232      * @param table a table name; must match the table name as it is stored
233      *        in the database
234      * @param scope the scope of interest; use same values as SCOPE
235      * @param nullable include columns that are nullable.
236      * @return <code>ResultSet</code> - each row is a column description
237      * @exception SQLException if a database access error occurs
238      *
239      */
240     public java.sql.ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException {
241         return null;
242     }
243     
244     /** Retrieves the <code>String</code> that this database uses as the
245      * separator between a catalog and table name.
246      *
247      * @return the separator string
248      * @exception SQLException if a database access error occurs
249      *
250      */
251     public String getCatalogSeparator() throws SQLException {
252         return "";
253     }
254     
255     /** Retrieves the database vendor's preferred term for "catalog".
256      *
257      * @return the vendor term for "catalog"
258      * @exception SQLException if a database access error occurs
259      *
260      */
261     public String getCatalogTerm() throws SQLException {
262         return "";
263     }
264     
265     /** Retrieves the catalog names available in this database.  The results
266      * are ordered by catalog name.
267      *
268      * <P>The catalog column is:
269      *  <OL>
270      *   <LI><B>TABLE_CAT</B> String => catalog name
271      *  </OL>
272      *
273      * @return a <code>ResultSet</code> object in which each row has a
274      *         single <code>String</code> column that is a catalog name
275      * @exception SQLException if a database access error occurs
276      *
277      */
278     public java.sql.ResultSet getCatalogs() throws SQLException {
279         AResultSet ars = new AResultSet();
280         ars.setQuickResultSet("TABLE_CAT","default");
281         
282         return ars;
283     }
284     
285     /** Retrieves a description of the access rights for a table's columns.
286      *
287      * <P>Only privileges matching the column name criteria are
288      * returned.  They are ordered by COLUMN_NAME and PRIVILEGE.
289      *
290      * <P>Each privilige description has the following columns:
291      *  <OL>
292      *   <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
293      *   <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
294      *   <LI><B>TABLE_NAME</B> String => table name
295      *   <LI><B>COLUMN_NAME</B> String => column name
296      *   <LI><B>GRANTOR</B> => grantor of access (may be <code>null</code>)
297      *   <LI><B>GRANTEE</B> String => grantee of access
298      *   <LI><B>PRIVILEGE</B> String => name of access (SELECT,
299      *      INSERT, UPDATE, REFRENCES, ...)
300      *   <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
301      *      to grant to others; "NO" if not; <code>null</code> if unknown
302      *  </OL>
303      *
304      * @param catalog a catalog name; must match the catalog name as it
305      *        is stored in the database; "" retrieves those without a catalog;
306      *        <code>null</code> means that the catalog name should not be used to narrow
307      *        the search
308      * @param schema a schema name; must match the schema name as it is
309      *        stored in the database; "" retrieves those without a schema;
310      *        <code>null</code> means that the schema name should not be used to narrow
311      *        the search
312      * @param table a table name; must match the table name as it is
313      *        stored in the database
314      * @param columnNamePattern a column name pattern; must match the column
315      *        name as it is stored in the database
316      * @return <code>ResultSet</code> - each row is a column privilege description
317      * @exception SQLException if a database access error occurs
318      * @see #getSearchStringEscape
319      *
320      */
321     public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException {
322         return null;
323     }
324     
325     /** Retrieves a description of table columns available in
326      * the specified catalog.
327      *
328      * <P>Only column descriptions matching the catalog, schema, table
329      * and column name criteria are returned.  They are ordered by
330      * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>, and
331      * <code>ORDINAL_POSITION</code>.
332      *
333      * <P>Each column description has the following columns:
334      *  <OL>
335      *   <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
336      *   <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
337      *   <LI><B>TABLE_NAME</B> String => table name
338      *   <LI><B>COLUMN_NAME</B> String => column name
339      *   <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
340      *   <LI><B>TYPE_NAME</B> String => Data source dependent type name,
341      *  for a UDT the type name is fully qualified
342      *   <LI><B>COLUMN_SIZE</B> int => column size.  For char or date
343      *       types this is the maximum number of characters, for numeric or
344      *       decimal types this is precision.
345      *   <LI><B>BUFFER_LENGTH</B> is not used.
346      *   <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
347      *   <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
348      *   <LI><B>NULLABLE</B> int => is NULL allowed.
349      *      <UL>
350      *      <LI> columnNoNulls - might not allow <code>NULL</code> values
351      *      <LI> columnNullable - definitely allows <code>NULL</code> values
352      *      <LI> columnNullableUnknown - nullability unknown
353      *      </UL>
354      *   <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
355      *   <LI><B>COLUMN_DEF</B> String => default value (may be <code>null</code>)
356      *   <LI><B>SQL_DATA_TYPE</B> int => unused
357      *   <LI><B>SQL_DATETIME_SUB</B> int => unused
358      *   <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
359      *       maximum number of bytes in the column
360      *   <LI><B>ORDINAL_POSITION</B> int  => index of column in table
361      *      (starting at 1)
362      *   <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
363      *      does not allow NULL values; "YES" means the column might
364      *      allow NULL values.  An empty string means nobody knows.
365      *  <LI><B>SCOPE_CATLOG</B> String => catalog of table that is the scope
366      *      of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
367      *  <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the scope
368      *      of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
369      *  <LI><B>SCOPE_TABLE</B> String => table name that this the scope
370      *      of a reference attribure (<code>null</code> if the DATA_TYPE isn't REF)
371      *  <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
372      *      Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
373      *      isn't DISTINCT or user-generated REF)
374      *  </OL>
375      *
376      * @param catalog a catalog name; must match the catalog name as it
377      *        is stored in the database; "" retrieves those without a catalog;
378      *        <code>null</code> means that the catalog name should not be used to narrow
379      *        the search
380      * @param schemaPattern a schema name pattern; must match the schema name
381      *        as it is stored in the database; "" retrieves those without a schema;
382      *        <code>null</code> means that the schema name should not be used to narrow
383      *        the search
384      * @param tableNamePattern a table name pattern; must match the
385      *        table name as it is stored in the database
386      * @param columnNamePattern a column name pattern; must match the column
387      *        name as it is stored in the database
388      * @return <code>ResultSet</code> - each row is a column description
389      * @exception SQLException if a database access error occurs
390      * @see #getSearchStringEscape
391      *
392      */
393     public java.sql.ResultSet getColumns(String catalog, String schemaPattern, 
394             String tableNamePattern, String columnNamePattern) throws SQLException {
395         try{
396             return conn.getConnectionManager().executeStatement(
397                 "select columns " + tableNamePattern
398             );
399         }catch(Exception e){
400             throw new SQLException("Can't get columns for " + tableNamePattern 
401                 + " because " + e.toString()
402             );
403         }
404     }
405     
406     /** Retrieves the connection that produced this metadata object.
407      * <P>
408      * @return the connection that produced this metadata object
409      * @exception SQLException if a database access error occurs
410      * @since 1.2
411      *
412      */
413     public java.sql.Connection getConnection() throws SQLException {
414         return conn;
415     }
416     
417     /** Retrieves a description of the foreign key columns in the given foreign key
418      * table that reference the primary key columns of the given primary key
419      * table (describe how one table imports another's key). This
420      * should normally return a single foreign key/primary key pair because
421      * most tables import a foreign key from a table only once.  They
422      * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
423      * KEY_SEQ.
424      *
425      * <P>Each foreign key column description has the following columns:
426      *  <OL>
427      *   <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>)
428      *   <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>)
429      *   <LI><B>PKTABLE_NAME</B> String => primary key table name
430      *   <LI><B>PKCOLUMN_NAME</B> String => primary key column name
431      *   <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
432      *      being exported (may be <code>null</code>)
433      *   <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
434      *      being exported (may be <code>null</code>)
435      *   <LI><B>FKTABLE_NAME</B> String => foreign key table name
436      *      being exported
437      *   <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
438      *      being exported
439      *   <LI><B>KEY_SEQ</B> short => sequence number within foreign key
440      *   <LI><B>UPDATE_RULE</B> short => What happens to
441      *       foreign key when primary is updated:
442      *      <UL>
443      *      <LI> importedNoAction - do not allow update of primary
444      *               key if it has been imported
445      *      <LI> importedKeyCascade - change imported key to agree
446      *               with primary key update
447      *      <LI> importedKeySetNull - change imported key to <code>NULL</code> if
448      *               its primary key has been updated
449      *      <LI> importedKeySetDefault - change imported key to default values
450      *               if its primary key has been updated
451      *      <LI> importedKeyRestrict - same as importedKeyNoAction
452      *                                 (for ODBC 2.x compatibility)
453      *      </UL>
454      *   <LI><B>DELETE_RULE</B> short => What happens to
455      *      the foreign key when primary is deleted.
456      *      <UL>
457      *      <LI> importedKeyNoAction - do not allow delete of primary
458      *               key if it has been imported
459      *      <LI> importedKeyCascade - delete rows that import a deleted key
460      *      <LI> importedKeySetNull - change imported key to <code>NULL</code> if
461      *               its primary key has been deleted
462      *      <LI> importedKeyRestrict - same as importedKeyNoAction
463      *                                 (for ODBC 2.x compatibility)
464      *      <LI> importedKeySetDefault - change imported key to default if
465      *               its primary key has been deleted
466      *      </UL>
467      *   <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
468      *   <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
469      *   <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
470      *      constraints be deferred until commit
471      *      <UL>
472      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
473      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
474      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
475      *      </UL>
476      *  </OL>
477      *
478      * @param primaryCatalog a catalog name; must match the catalog name
479      * as it is stored in the database; "" retrieves those without a
480      * catalog; <code>null</code> means drop catalog name from the selection criteria
481      * @param primarySchema a schema name; must match the schema name as
482      * it is stored in the database; "" retrieves those without a schema;
483      * <code>null</code> means drop schema name from the selection criteria
484      * @param primaryTable the name of the table that exports the key; must match
485      * the table name as it is stored in the database
486      * @param foreignCatalog a catalog name; must match the catalog name as
487      * it is stored in the database; "" retrieves those without a
488      * catalog; <code>null</code> means drop catalog name from the selection criteria
489      * @param foreignSchema a schema name; must match the schema name as it
490      * is stored in the database; "" retrieves those without a schema;
491      * <code>null</code> means drop schema name from the selection criteria
492      * @param foreignTable the name of the table that imports the key; must match
493      * the table name as it is stored in the database
494      * @return <code>ResultSet</code> - each row is a foreign key column description
495      * @exception SQLException if a database access error occurs
496      * @see #getImportedKeys
497      *
498      */
499     public java.sql.ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {
500         return null;
501     }
502     
503     /** Retrieves the major version number of the underlying database.
504      *
505      * @return the underlying database's major version
506      * @exception SQLException if a database access error occurs
507      * @since 1.4
508      *
509      */
510     public int getDatabaseMajorVersion() throws SQLException {
511         return 0;
512     }
513     
514     /** Retrieves the minor version number of the underlying database.
515      *
516      * @return underlying database's minor version
517      * @exception SQLException if a database access error occurs
518      * @since 1.4
519      *
520      */
521     public int getDatabaseMinorVersion() throws SQLException {
522         return 1;
523     }
524     
525     /** Retrieves the name of this database product.
526      *
527      * @return database product name
528      * @exception SQLException if a database access error occurs
529      *
530      */
531     public String getDatabaseProductName() throws SQLException {
532         return "Ashpool XML";
533     }
534     
535     /** Retrieves the version number of this database product.
536      *
537      * @return database version number
538      * @exception SQLException if a database access error occurs
539      *
540      */
541     public String getDatabaseProductVersion() throws SQLException {
542         return "1";
543     }
544     
545     /** Retrieves this database's default transaction isolation level.  The
546      * possible values are defined in <code>java.sql.Connection</code>.
547      *
548      * @return the default isolation level
549      * @exception SQLException if a database access error occurs
550      * @see Connection
551      *
552      */
553     public int getDefaultTransactionIsolation() throws SQLException {
554         return 0;
555     }
556     
557     /** Retrieves this JDBC driver's major version number.
558      *
559      * @return JDBC driver major version
560      *
561      */
562     public int getDriverMajorVersion() {
563         return 0;
564     }
565     
566     /** Retrieves this JDBC driver's minor version number.
567      *
568      * @return JDBC driver minor version number
569      *
570      */
571     public int getDriverMinorVersion() {
572         return 1;
573     }
574     
575     /** Retrieves the name of this JDBC driver.
576      *
577      * @return JDBC driver name
578      * @exception SQLException if a database access error occurs
579      *
580      */
581     public String getDriverName() throws SQLException {
582         return "Ashpool JDBC Driver";
583     }
584     
585     /** Retrieves the version number of this JDBC driver as a <code>String</code>.
586      *
587      * @return JDBC driver version
588      * @exception SQLException if a database access error occurs
589      *
590      */
591     public String getDriverVersion() throws SQLException {
592         return "1";
593     }
594     
595     /** Retrieves a description of the foreign key columns that reference the
596      * given table's primary key columns (the foreign keys exported by a
597      * table).  They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
598      * FKTABLE_NAME, and KEY_SEQ.
599      *
600      * <P>Each foreign key column description has the following columns:
601      *  <OL>
602      *   <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>)
603      *   <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>)
604      *   <LI><B>PKTABLE_NAME</B> String => primary key table name
605      *   <LI><B>PKCOLUMN_NAME</B> String => primary key column name
606      *   <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
607      *      being exported (may be <code>null</code>)
608      *   <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
609      *      being exported (may be <code>null</code>)
610      *   <LI><B>FKTABLE_NAME</B> String => foreign key table name
611      *      being exported
612      *   <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
613      *      being exported
614      *   <LI><B>KEY_SEQ</B> short => sequence number within foreign key
615      *   <LI><B>UPDATE_RULE</B> short => What happens to
616      *       foreign key when primary is updated:
617      *      <UL>
618      *      <LI> importedNoAction - do not allow update of primary
619      *               key if it has been imported
620      *      <LI> importedKeyCascade - change imported key to agree
621      *               with primary key update
622      *      <LI> importedKeySetNull - change imported key to <code>NULL</code> if
623      *               its primary key has been updated
624      *      <LI> importedKeySetDefault - change imported key to default values
625      *               if its primary key has been updated
626      *      <LI> importedKeyRestrict - same as importedKeyNoAction
627      *                                 (for ODBC 2.x compatibility)
628      *      </UL>
629      *   <LI><B>DELETE_RULE</B> short => What happens to
630      *      the foreign key when primary is deleted.
631      *      <UL>
632      *      <LI> importedKeyNoAction - do not allow delete of primary
633      *               key if it has been imported
634      *      <LI> importedKeyCascade - delete rows that import a deleted key
635      *      <LI> importedKeySetNull - change imported key to <code>NULL</code> if
636      *               its primary key has been deleted
637      *      <LI> importedKeyRestrict - same as importedKeyNoAction
638      *                                 (for ODBC 2.x compatibility)
639      *      <LI> importedKeySetDefault - change imported key to default if
640      *               its primary key has been deleted
641      *      </UL>
642      *   <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
643      *   <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
644      *   <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
645      *      constraints be deferred until commit
646      *      <UL>
647      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
648      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
649      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
650      *      </UL>
651      *  </OL>
652      *
653      * @param catalog a catalog name; must match the catalog name as it
654      *        is stored in this database; "" retrieves those without a catalog;
655      *        <code>null</code> means that the catalog name should not be used to narrow
656      *        the search
657      * @param schema a schema name; must match the schema name
658      *        as it is stored in the database; "" retrieves those without a schema;
659      *        <code>null</code> means that the schema name should not be used to narrow
660      *        the search
661      * @param table a table name; must match the table name as it is stored
662      *        in this database
663      * @return a <code>ResultSet</code> object in which each row is a
664      *         foreign key column description
665      * @exception SQLException if a database access error occurs
666      * @see #getImportedKeys
667      *
668      */
669     public java.sql.ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
670         return null;
671     }
672     
673     /** Retrieves all the "extra" characters that can be used in unquoted
674      * identifier names (those beyond a-z, A-Z, 0-9 and _).
675      *
676      * @return the string containing the extra characters
677      * @exception SQLException if a database access error occurs
678      *
679      */
680     public String getExtraNameCharacters() throws SQLException {
681         return "";
682     }
683     
684     /** Retrieves the string used to quote SQL identifiers.
685      * This method returns a space " " if identifier quoting is not supported.
686      *
687      * @return the quoting string or a space if quoting is not supported
688      * @exception SQLException if a database access error occurs
689      *
690      */
691     public String getIdentifierQuoteString() throws SQLException {
692         return " ";
693     }
694     
695     /** Retrieves a description of the primary key columns that are
696      * referenced by a table's foreign key columns (the primary keys
697      * imported by a table).  They are ordered by PKTABLE_CAT,
698      * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
699      *
700      * <P>Each primary key column description has the following columns:
701      *  <OL>
702      *   <LI><B>PKTABLE_CAT</B> String => primary key table catalog
703      *      being imported (may be <code>null</code>)
704      *   <LI><B>PKTABLE_SCHEM</B> String => primary key table schema
705      *      being imported (may be <code>null</code>)
706      *   <LI><B>PKTABLE_NAME</B> String => primary key table name
707      *      being imported
708      *   <LI><B>PKCOLUMN_NAME</B> String => primary key column name
709      *      being imported
710      *   <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
711      *   <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
712      *   <LI><B>FKTABLE_NAME</B> String => foreign key table name
713      *   <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
714      *   <LI><B>KEY_SEQ</B> short => sequence number within a foreign key
715      *   <LI><B>UPDATE_RULE</B> short => What happens to a
716      *       foreign key when the primary key is updated:
717      *      <UL>
718      *      <LI> importedNoAction - do not allow update of primary
719      *               key if it has been imported
720      *      <LI> importedKeyCascade - change imported key to agree
721      *               with primary key update
722      *      <LI> importedKeySetNull - change imported key to <code>NULL</code>
723      *               if its primary key has been updated
724      *      <LI> importedKeySetDefault - change imported key to default values
725      *               if its primary key has been updated
726      *      <LI> importedKeyRestrict - same as importedKeyNoAction
727      *                                 (for ODBC 2.x compatibility)
728      *      </UL>
729      *   <LI><B>DELETE_RULE</B> short => What happens to
730      *      the foreign key when primary is deleted.
731      *      <UL>
732      *      <LI> importedKeyNoAction - do not allow delete of primary
733      *               key if it has been imported
734      *      <LI> importedKeyCascade - delete rows that import a deleted key
735      *      <LI> importedKeySetNull - change imported key to NULL if
736      *               its primary key has been deleted
737      *      <LI> importedKeyRestrict - same as importedKeyNoAction
738      *                                 (for ODBC 2.x compatibility)
739      *      <LI> importedKeySetDefault - change imported key to default if
740      *               its primary key has been deleted
741      *      </UL>
742      *   <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
743      *   <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
744      *   <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
745      *      constraints be deferred until commit
746      *      <UL>
747      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
748      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition
749      *      <LI> importedKeyNotDeferrable - see SQL92 for definition
750      *      </UL>
751      *  </OL>
752      *
753      * @param catalog a catalog name; must match the catalog name as it
754      *        is stored in the database; "" retrieves those without a catalog;
755      *        <code>null</code> means that the catalog name should not be used to narrow
756      *        the search
757      * @param schema a schema name; must match the schema name
758      *        as it is stored in the database; "" retrieves those without a schema;
759      *        <code>null</code> means that the schema name should not be used to narrow
760      *        the search
761      * @param table a table name; must match the table name as it is stored
762      *        in the database
763      * @return <code>ResultSet</code> - each row is a primary key column description
764      * @exception SQLException if a database access error occurs
765      * @see #getExportedKeys
766      *
767      */
768     public java.sql.ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException {
769         return null;
770     }
771     
772     /** Retrieves a description of the given table's indices and statistics. They are
773      * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
774      *
775      * <P>Each index column description has the following columns:
776      *  <OL>
777      *   <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
778      *   <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
779      *   <LI><B>TABLE_NAME</B> String => table name
780      *   <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique.
781      *      false when TYPE is tableIndexStatistic
782      *   <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be <code>null</code>);
783      *      <code>null</code> when TYPE is tableIndexStatistic
784      *   <LI><B>INDEX_NAME</B> String => index name; <code>null</code> when TYPE is
785      *      tableIndexStatistic
786      *   <LI><B>TYPE</B> short => index type:
787      *      <UL>
788      *      <LI> tableIndexStatistic - this identifies table statistics that are
789      *           returned in conjuction with a table's index descriptions
790      *      <LI> tableIndexClustered - this is a clustered index
791      *      <LI> tableIndexHashed - this is a hashed index
792      *      <LI> tableIndexOther - this is some other style of index
793      *      </UL>
794      *   <LI><B>ORDINAL_POSITION</B> short => column sequence number
795      *      within index; zero when TYPE is tableIndexStatistic
796      *   <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is
797      *      tableIndexStatistic
798      *   <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending,
799      *      "D" => descending, may be <code>null</code> if sort sequence is not supported;
800      *      <code>null</code> when TYPE is tableIndexStatistic
801      *   <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then
802      *      this is the number of rows in the table; otherwise, it is the
803      *      number of unique values in the index.
804      *   <LI><B>PAGES</B> int => When TYPE is  tableIndexStatisic then
805      *      this is the number of pages used for the table, otherwise it
806      *      is the number of pages used for the current index.
807      *   <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.
808      *      (may be <code>null</code>)
809      *  </OL>
810      *
811      * @param catalog a catalog name; must match the catalog name as it
812      *        is stored in this database; "" retrieves those without a catalog;
813      *        <code>null</code> means that the catalog name should not be used to narrow
814      *        the search
815      * @param schema a schema name; must match the schema name
816      *        as it is stored in this database; "" retrieves those without a schema;
817      *        <code>null</code> means that the schema name should not be used to narrow
818      *        the search
819      * @param table a table name; must match the table name as it is stored
820      *        in this database
821      * @param unique when true, return only indices for unique values;
822      *     when false, return indices regardless of whether unique or not
823      * @param approximate when true, result is allowed to reflect approximate
824      *     or out of data values; when false, results are requested to be
825      *     accurate
826      * @return <code>ResultSet</code> - each row is an index column description
827      * @exception SQLException if a database access error occurs
828      *
829      */
830     public java.sql.ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
831         return null;
832     }
833     
834     /** Retrieves the major JDBC version number for this
835      * driver.
836      *
837      * @return JDBC version major number
838      * @exception SQLException if a database access error occurs
839      * @since 1.4
840      *
841      */
842     public int getJDBCMajorVersion() throws SQLException {
843         return 0;
844     }
845     
846     /** Retrieves the minor JDBC version number for this
847      * driver.
848      *
849      * @return JDBC version minor number
850      * @exception SQLException if a database access error occurs
851      * @since 1.4
852      *
853      */
854     public int getJDBCMinorVersion() throws SQLException {
855         return 1;
856     }
857     
858     /** Retrieves the maximum number of hex characters this database allows in an
859      * inline binary literal.
860      *
861      * @return max the maximum length (in hex characters) for a binary literal;
862      *      a result of zero means that there is no limit or the limit
863      *      is not known
864      * @exception SQLException if a database access error occurs
865      *
866      */
867     public int getMaxBinaryLiteralLength() throws SQLException {
868         return 0;
869     }
870     
871     /** Retrieves the maximum number of characters that this database allows in a
872      * catalog name.
873      *
874      * @return the maximum number of characters allowed in a catalog name;
875      *      a result of zero means that there is no limit or the limit
876      *      is not known
877      * @exception SQLException if a database access error occurs
878      *
879      */
880     public int getMaxCatalogNameLength() throws SQLException {
881         return 0;
882     }
883     
884     /** Retrieves the maximum number of characters this database allows
885      * for a character literal.
886      *
887      * @return the maximum number of characters allowed for a character literal;
888      *      a result of zero means that there is no limit or the limit is
889      *      not known
890      * @exception SQLException if a database access error occurs
891      *
892      */
893     public int getMaxCharLiteralLength() throws SQLException {
894         return 0;
895     }
896     
897     /** Retrieves the maximum number of characters this database allows
898      * for a column name.
899      *
900      * @return the maximum number of characters allowed for a column name;
901      *      a result of zero means that there is no limit or the limit
902      *      is not known
903      * @exception SQLException if a database access error occurs
904      *
905      */
906     public int getMaxColumnNameLength() throws SQLException {
907         return 0;
908     }
909     
910     /** Retrieves the maximum number of columns this database allows in a
911      * <code>GROUP BY</code> clause.
912      *
913      * @return the maximum number of columns allowed;
914      *      a result of zero means that there is no limit or the limit
915      *      is not known
916      * @exception SQLException if a database access error occurs
917      *
918      */
919     public int getMaxColumnsInGroupBy() throws SQLException {
920         return 0;
921     }
922     
923     /** Retrieves the maximum number of columns this database allows in an index.
924      *
925      * @return the maximum number of columns allowed;
926      *      a result of zero means that there is no limit or the limit
927      *      is not known
928      * @exception SQLException if a database access error occurs
929      *
930      */
931     public int getMaxColumnsInIndex() throws SQLException {
932         return 0;
933     }
934     
935     /** Retrieves the maximum number of columns this database allows in an
936      * <code>ORDER BY</code> clause.
937      *
938      * @return the maximum number of columns allowed;
939      *      a result of zero means that there is no limit or the limit
940      *      is not known
941      * @exception SQLException if a database access error occurs
942      *
943      */
944     public int getMaxColumnsInOrderBy() throws SQLException {
945         return 0;
946     }
947     
948     /** Retrieves the maximum number of columns this database allows in a
949      * <code>SELECT</code> list.
950      *
951      * @return the maximum number of columns allowed;
952      *      a result of zero means that there is no limit or the limit
953      *      is not known
954      * @exception SQLException if a database access error occurs
955      *
956      */
957     public int getMaxColumnsInSelect() throws SQLException {
958         return 0;
959     }
960     
961     /** Retrieves the maximum number of columns this database allows in a table.
962      *
963      * @return the maximum number of columns allowed;
964      *      a result of zero means that there is no limit or the limit
965      *      is not known
966      * @exception SQLException if a database access error occurs
967      *
968      */
969     public int getMaxColumnsInTable() throws SQLException {
970         return 0;
971     }
972     
973     /** Retrieves the maximum number of concurrent connections to this
974      * database that are possible.
975      *
976      * @return the maximum number of active connections possible at one time;
977      *      a result of zero means that there is no limit or the limit
978      *      is not known
979      * @exception SQLException if a database access error occurs
980      *
981      */
982     public int getMaxConnections() throws SQLException {
983         return 0;
984     }
985     
986     /** Retrieves the maximum number of characters that this database allows in a
987      * cursor name.
988      *
989      * @return the maximum number of characters allowed in a cursor name;
990      *      a result of zero means that there is no limit or the limit
991      *      is not known
992      * @exception SQLException if a database access error occurs
993      *
994      */
995     public int getMaxCursorNameLength() throws SQLException {
996         return 0;
997     }
998     
999     /** Retrieves the maximum number of bytes this database allows for an
1000     * index, including all of the parts of the index.
1001     *
1002     * @return the maximum number of bytes allowed; this limit includes the
1003     *      composite of all the constituent parts of the index;
1004     *      a result of zero means that there is no limit or the limit
1005     *      is not known
1006     * @exception SQLException if a database access error occurs
1007     *
1008     */
1009    public int getMaxIndexLength() throws SQLException {
1010        return 0;
1011    }
1012    
1013    /** Retrieves the maximum number of characters that this database allows in a
1014     * procedure name.
1015     *
1016     * @return the maximum number of characters allowed in a procedure name;
1017     *      a result of zero means that there is no limit or the limit
1018     *      is not known
1019     * @exception SQLException if a database access error occurs
1020     *
1021     */
1022    public int getMaxProcedureNameLength() throws SQLException {
1023        return 0;
1024    }
1025    
1026    /** Retrieves the maximum number of bytes this database allows in
1027     * a single row.
1028     *
1029     * @return the maximum number of bytes allowed for a row; a result of
1030     *         zero means that there is no limit or the limit is not known
1031     * @exception SQLException if a database access error occurs
1032     *
1033     */
1034    public int getMaxRowSize() throws SQLException {
1035        return 0;
1036    }
1037    
1038    /** Retrieves the maximum number of characters that this database allows in a
1039     * schema name.
1040     *
1041     * @return the maximum number of characters allowed in a schema name;
1042     *      a result of zero means that there is no limit or the limit
1043     *      is not known
1044     * @exception SQLException if a database access error occurs
1045     *
1046     */
1047    public int getMaxSchemaNameLength() throws SQLException {
1048        return 0;
1049    }
1050    
1051    /** Retrieves the maximum number of characters this database allows in
1052     * an SQL statement.
1053     *
1054     * @return the maximum number of characters allowed for an SQL statement;
1055     *      a result of zero means that there is no limit or the limit
1056     *      is not known
1057     * @exception SQLException if a database access error occurs
1058     *
1059     */
1060    public int getMaxStatementLength() throws SQLException {
1061        return 0;
1062    }
1063    
1064    /** Retrieves the maximum number of active statements to this database
1065     * that can be open at the same time.
1066     *
1067     * @return the maximum number of statements that can be open at one time;
1068     *      a result of zero means that there is no limit or the limit
1069     *      is not known
1070     * @exception SQLException if a database access error occurs
1071     *
1072     */
1073    public int getMaxStatements() throws SQLException {
1074        return 0;
1075    }
1076    
1077    /** Retrieves the maximum number of characters this database allows in
1078     * a table name.
1079     *
1080     * @return the maximum number of characters allowed for a table name;
1081     *      a result of zero means that there is no limit or the limit
1082     *      is not known
1083     * @exception SQLException if a database access error occurs
1084     *
1085     */
1086    public int getMaxTableNameLength() throws SQLException {
1087        return 0;
1088    }
1089    
1090    /** Retrieves the maximum number of tables this database allows in a
1091     * <code>SELECT</code> statement.
1092     *
1093     * @return the maximum number of tables allowed in a <code>SELECT</code>
1094     *         statement; a result of zero means that there is no limit or
1095     *         the limit is not known
1096     * @exception SQLException if a database access error occurs
1097     *
1098     */
1099    public int getMaxTablesInSelect() throws SQLException {
1100        return 0;
1101    }
1102    
1103    /** Retrieves the maximum number of characters this database allows in
1104     * a user name.
1105     *
1106     * @return the maximum number of characters allowed for a user name;
1107     *      a result of zero means that there is no limit or the limit
1108     *      is not known
1109     * @exception SQLException if a database access error occurs
1110     *
1111     */
1112    public int getMaxUserNameLength() throws SQLException {
1113        return 0;
1114    }
1115    
1116    /** Retrieves a comma-separated list of math functions available with
1117     * this database.  These are the Open /Open CLI math function names used in
1118     * the JDBC function escape clause.
1119     *
1120     * @return the list of math functions supported by this database
1121     * @exception SQLException if a database access error occurs
1122     *
1123     */
1124    public String getNumericFunctions() throws SQLException {
1125        return "count,round,sum";
1126    }
1127    
1128    /** Retrieves a description of the given table's primary key columns.  They
1129     * are ordered by COLUMN_NAME.
1130     *
1131     * <P>Each primary key column description has the following columns:
1132     *  <OL>
1133     *   <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1134     *   <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1135     *   <LI><B>TABLE_NAME</B> String => table name
1136     *   <LI><B>COLUMN_NAME</B> String => column name
1137     *   <LI><B>KEY_SEQ</B> short => sequence number within primary key
1138     *   <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
1139     *  </OL>
1140     *
1141     * @param catalog a catalog name; must match the catalog name as it
1142     *        is stored in the database; "" retrieves those without a catalog;
1143     *        <code>null</code> means that the catalog name should not be used to narrow
1144     *        the search
1145     * @param schema a schema name; must match the schema name
1146     *        as it is stored in the database; "" retrieves those without a schema;
1147     *        <code>null</code> means that the schema name should not be used to narrow
1148     *        the search
1149     * @param table a table name; must match the table name as it is stored
1150     *        in the database
1151     * @return <code>ResultSet</code> - each row is a primary key column description
1152     * @exception SQLException if a database access error occurs
1153     *
1154     */
1155    public java.sql.ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
1156        return null;
1157    }
1158    
1159    /** Retrieves a description of the given catalog's stored procedure parameter
1160     * and result columns.
1161     *
1162     * <P>Only descriptions matching the schema, procedure and
1163     * parameter name criteria are returned.  They are ordered by
1164     * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
1165     * if any, is first. Next are the parameter descriptions in call
1166     * order. The column descriptions follow in column number order.
1167     *
1168     * <P>Each row in the <code>ResultSet</code> is a parameter description or
1169     * column description with the following fields:
1170     *  <OL>
1171     *   <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
1172     *   <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
1173     *   <LI><B>PROCEDURE_NAME</B> String => procedure name
1174     *   <LI><B>COLUMN_NAME</B> String => column/parameter name
1175     *   <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
1176     *      <UL>
1177     *      <LI> procedureColumnUnknown - nobody knows
1178     *      <LI> procedureColumnIn - IN parameter
1179     *      <LI> procedureColumnInOut - INOUT parameter
1180     *      <LI> procedureColumnOut - OUT parameter
1181     *      <LI> procedureColumnReturn - procedure return value
1182     *      <LI> procedureColumnResult - result column in <code>ResultSet</code>
1183     *      </UL>
1184     *  <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
1185     *   <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
1186     *  type name is fully qualified
1187     *   <LI><B>PRECISION</B> int => precision
1188     *   <LI><B>LENGTH</B> int => length in bytes of data
1189     *   <LI><B>SCALE</B> short => scale
1190     *   <LI><B>RADIX</B> short => radix
1191     *   <LI><B>NULLABLE</B> short => can it contain NULL.
1192     *      <UL>
1193     *      <LI> procedureNoNulls - does not allow NULL values
1194     *      <LI> procedureNullable - allows NULL values
1195     *      <LI> procedureNullableUnknown - nullability unknown
1196     *      </UL>
1197     *   <LI><B>REMARKS</B> String => comment describing parameter/column
1198     *  </OL>
1199     *
1200     * <P><B>Note:</B> Some databases may not return the column
1201     * descriptions for a procedure. Additional columns beyond
1202     * REMARKS can be defined by the database.
1203     *
1204     * @param catalog a catalog name; must match the catalog name as it
1205     *        is stored in the database; "" retrieves those without a catalog;
1206     *        <code>null</code> means that the catalog name should not be used to narrow
1207     *        the search
1208     * @param schemaPattern a schema name pattern; must match the schema name
1209     *        as it is stored in the database; "" retrieves those without a schema;
1210     *        <code>null</code> means that the schema name should not be used to narrow
1211     *        the search
1212     * @param procedureNamePattern a procedure name pattern; must match the
1213     *        procedure name as it is stored in the database
1214     * @param columnNamePattern a column name pattern; must match the column name
1215     *        as it is stored in the database
1216     * @return <code>ResultSet</code> - each row describes a stored procedure parameter or
1217     *      column
1218     * @exception SQLException if a database access error occurs
1219     * @see #getSearchStringEscape
1220     *
1221     */
1222    public java.sql.ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
1223        return null;
1224    }
1225    
1226    /** Retrieves the database vendor's preferred term for "procedure".
1227     *
1228     * @return the vendor term for "procedure"
1229     * @exception SQLException if a database access error occurs
1230     *
1231     */
1232    public String getProcedureTerm() throws SQLException {
1233        return "";
1234    }
1235    
1236    /** Retrieves a description of the stored procedures available in the given
1237     * catalog.
1238     * <P>
1239     * Only procedure descriptions matching the schema and
1240     * procedure name criteria are returned.  They are ordered by
1241     * <code>PROCEDURE_SCHEM</code> and <code>PROCEDURE_NAME</code>.
1242     *
1243     * <P>Each procedure description has the the following columns:
1244     *  <OL>
1245     *   <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
1246     *   <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
1247     *   <LI><B>PROCEDURE_NAME</B> String => procedure name
1248     *  <LI> reserved for future use
1249     *  <LI> reserved for future use
1250     *  <LI> reserved for future use
1251     *   <LI><B>REMARKS</B> String => explanatory comment on the procedure
1252     *   <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
1253     *      <UL>
1254     *      <LI> procedureResultUnknown - May return a result
1255     *      <LI> procedureNoResult - Does not return a result
1256     *      <LI> procedureReturnsResult - Returns a result
1257     *      </UL>
1258     *  </OL>
1259     *
1260     * @param catalog a catalog name; must match the catalog name as it
1261     *        is stored in the database; "" retrieves those without a catalog;
1262     *        <code>null</code> means that the catalog name should not be used to narrow
1263     *        the search
1264     * @param schemaPattern a schema name pattern; must match the schema name
1265     *        as it is stored in the database; "" retrieves those without a schema;
1266     *        <code>null</code> means that the schema name should not be used to narrow
1267     *        the search
1268     * @param procedureNamePattern a procedure name pattern; must match the
1269     *        procedure name as it is stored in the database
1270     * @return <code>ResultSet</code> - each row is a procedure description
1271     * @exception SQLException if a database access error occurs
1272     * @see #getSearchStringEscape
1273     *
1274     */
1275    public java.sql.ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
1276        return null;
1277    }
1278    
1279    /** Retrieves the default holdability of this <code>ResultSet</code>
1280     * object.
1281     *
1282     * @return the default holdability; either
1283     *         <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
1284     *         <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
1285     * @exception SQLException if a database access error occurs
1286     * @since 1.4
1287     *
1288     */
1289    public int getResultSetHoldability() throws SQLException {
1290        return 0;
1291    }
1292    
1293    /** Retrieves a comma-separated list of all of this database's SQL keywords
1294     * that are NOT also SQL92 keywords.
1295     *
1296     * @return the list of this database's keywords that are not also
1297     *         SQL92 keywords
1298     * @exception SQLException if a database access error occurs
1299     *
1300     */
1301    public String getSQLKeywords() throws SQLException {
1302        return "";
1303    }
1304    
1305    /** Indicates whether the SQLSTATEs returned by <code>SQLException.getSQLState</code>
1306     * is X/Open (now known as Open Group) SQL CLI or SQL99.
1307     * @return the type of SQLSTATEs, one of:
1308     *        sqlStateXOpen or
1309     *        sqlStateSQL99
1310     * @throws SQLException if a database access error occurs
1311     * @since 1.4
1312     *
1313     */
1314    public int getSQLStateType() throws SQLException {
1315        return 0;
1316    }
1317    
1318    /** Retrieves the database vendor's preferred term for "schema".
1319     *
1320     * @return the vendor term for "schema"
1321     * @exception SQLException if a database access error occurs
1322     *
1323     */
1324    public String getSchemaTerm() throws SQLException {
1325        return "xsd";
1326    }
1327    
1328    /** Retrieves the schema names available in this database.  The results
1329     * are ordered by schema name.
1330     *
1331     * <P>The schema column is:
1332     *  <OL>
1333     *   <LI><B>TABLE_SCHEM</B> String => schema name
1334     *  <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>)
1335     *  </OL>
1336     *
1337     * @return a <code>ResultSet</code> object in which each row is a
1338     *         schema decription
1339     * @exception SQLException if a database access error occurs
1340     *
1341     */
1342    public java.sql.ResultSet getSchemas() throws SQLException {
1343         //return conn.getConnectionManager().getTableManager().getTables();
1344        return conn.getConnectionManager().getTables();
1345    }
1346    
1347    /** Retrieves the string that can be used to escape wildcard characters.
1348     * This is the string that can be used to escape '_' or '%' in
1349     * the catalog search parameters that are a pattern (and therefore use one
1350     * of the wildcard characters).
1351     *
1352     * <P>The '_' character represents any single character;
1353     * the '%' character represents any sequence of zero or
1354     * more characters.
1355     *
1356     * @return the string used to escape wildcard characters
1357     * @exception SQLException if a database access error occurs
1358     *
1359     */
1360    public String getSearchStringEscape() throws SQLException {
1361        return "\\";
1362    }
1363    
1364    /** Retrieves a comma-separated list of string functions available with
1365     * this database.  These are the  Open Group CLI string function names used
1366     * in the JDBC function escape clause.
1367     *
1368     * @return the list of string functions supported by this database
1369     * @exception SQLException if a database access error occurs
1370     *
1371     */
1372    public String getStringFunctions() throws SQLException {
1373        return "concat,contains,starts-with,string-length,substring,substring-after,substring-before";
1374    }
1375    
1376    /** Retrieves a description of the table hierarchies defined in a particular
1377     * schema in this database.
1378     *
1379     * <P>Only supertable information for tables matching the catalog, schema
1380     * and table name are returned. The table name parameter may be a fully-
1381     * qualified name, in which case, the catalog and schemaPattern parameters
1382     * are ignored. If a table does not have a super table, it is not listed here.
1383     * Supertables have to be defined in the same catalog and schema as the
1384     * sub tables. Therefore, the type description does not need to include
1385     * this information for the supertable.
1386     *
1387     * <P>Each type description has the following columns:
1388     *  <OL>
1389     *  <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>)
1390     *  <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>)
1391     *  <LI><B>TABLE_NAME</B> String => type name
1392     *  <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name
1393     *  </OL>
1394     *
1395     * <P><B>Note:</B> If the driver does not support type hierarchies, an
1396     * empty result set is returned.
1397     *
1398     * @param catalog a catalog name; "" retrieves those without a catalog;
1399     *        <code>null</code> means drop catalog name from the selection criteria
1400     * @param schemaPattern a schema name pattern; "" retrieves those
1401     *        without a schema
1402     * @param tableNamePattern a table name pattern; may be a fully-qualified
1403     *        name
1404     * @return a <code>ResultSet</code> object in which each row is a type description
1405     * @throws SQLException if a database access error occurs
1406     * @since 1.4
1407     *
1408     */
1409    public java.sql.ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {
1410        return null;
1411    }
1412    
1413    /** Retrieves a description of the user-defined type (UDT) hierarchies defined in a
1414     * particular schema in this database. Only the immediate super type/
1415     * sub type relationship is modeled.
1416     * <P>
1417     * Only supertyp