0001: /*
0002: * $Id: AxionDatabaseMetaData.java,v 1.36 2007/11/13 19:04:01 rwald Exp $
0003: * =======================================================================
0004: * Copyright (c) 2002-2005 Axion Development Team. All rights reserved.
0005: *
0006: * Redistribution and use in source and binary forms, with or without
0007: * modification, are permitted provided that the following conditions
0008: * are met:
0009: *
0010: * 1. Redistributions of source code must retain the above
0011: * copyright notice, this list of conditions and the following
0012: * disclaimer.
0013: *
0014: * 2. Redistributions in binary form must reproduce the above copyright
0015: * notice, this list of conditions and the following disclaimer in
0016: * the documentation and/or other materials provided with the
0017: * distribution.
0018: *
0019: * 3. The names "Tigris", "Axion", nor the names of its contributors may
0020: * not be used to endorse or promote products derived from this
0021: * software without specific prior written permission.
0022: *
0023: * 4. Products derived from this software may not be called "Axion", nor
0024: * may "Tigris" or "Axion" appear in their names without specific prior
0025: * written permission.
0026: *
0027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0028: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0029: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
0030: * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0031: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0032: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0033: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0034: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0035: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0036: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0037: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0038: * =======================================================================
0039: */
0040:
0041: package org.axiondb.jdbc;
0042:
0043: import java.sql.Connection;
0044: import java.sql.DatabaseMetaData;
0045: import java.sql.ResultSet;
0046: import java.sql.RowIdLifetime;
0047: import java.sql.SQLException;
0048: import java.sql.Statement;
0049:
0050: import org.axiondb.Database;
0051:
0052: /**
0053: * A {@link DatabaseMetaData}implementation.
0054: *
0055: * @version $Revision: 1.36 $ $Date: 2007/11/13 19:04:01 $
0056: * @author Rodney Waldhoff
0057: */
0058: public class AxionDatabaseMetaData implements DatabaseMetaData {
0059:
0060: public AxionDatabaseMetaData(AxionConnection conn, Database db) {
0061: _connection = conn;
0062: _db = db;
0063: }
0064:
0065: //-------------------------------------------------------------------------
0066:
0067: /** Currently returns "<code>AxionDB</code>". */
0068: public String getDatabaseProductName() throws SQLException {
0069: return "AxionDB";
0070: }
0071:
0072: /** Currently returns "<code>1.0M1</code>". */
0073: public String getDatabaseProductVersion() throws SQLException {
0074: return AXION_VERSION;
0075: }
0076:
0077: /** Currently returns "<code>Axion JDBC Driver". */
0078: public String getDriverName() throws SQLException {
0079: return "Axion JDBC Driver";
0080: }
0081:
0082: /** Currently returns "<code>1.0M1</code>". */
0083: public String getDriverVersion() throws SQLException {
0084: return AXION_VERSION;
0085: }
0086:
0087: /** Currently returns <code>0</code>. */
0088: public int getDriverMajorVersion() {
0089: return DB_MAJOR_VERSION;
0090: }
0091:
0092: /** Currently returns <code>1</code>. */
0093: public int getDriverMinorVersion() {
0094: return DB_MINOR_VERSION;
0095: }
0096:
0097: //-------------------------------------------------------------------------
0098:
0099: /** Currently returns <code>null</code>. */
0100: public String getUserName() throws SQLException {
0101: return null;
0102: }
0103:
0104: /** Currently returns <code>false</code>. */
0105: public boolean allProceduresAreCallable() throws SQLException {
0106: return false;
0107: }
0108:
0109: /** Returns <code>true</code>, since all tables are indeed selectable. */
0110: public boolean allTablesAreSelectable() throws SQLException {
0111: return true;
0112: }
0113:
0114: /**
0115: * Returns <code>true</code> when this database is known to be read only, false
0116: * otherwise.
0117: */
0118: public boolean isReadOnly() throws SQLException {
0119: return _db.isReadOnly();
0120: }
0121:
0122: /** Returns <code>false</code>, since Axion currently ignores case in identifiers. */
0123: public boolean supportsMixedCaseIdentifiers() throws SQLException {
0124: return false;
0125: }
0126:
0127: /** Returns <code>true</code>, since Axion supports column aliasing. */
0128: public boolean supportsColumnAliasing() throws SQLException {
0129: return true;
0130: }
0131:
0132: /**
0133: * Returns <code>true</code>, since Axion supports addBatch,clearBatch and
0134: * executeBatch.
0135: */
0136: public boolean supportsBatchUpdates() throws SQLException {
0137: return true;
0138: }
0139:
0140: /** Returns my {@link Connection}. */
0141: public Connection getConnection() throws SQLException {
0142: return _connection;
0143: }
0144:
0145: /**
0146: * Returns <code>true</code>, since <code>null</code> s are considered greater
0147: * than any non- <code>null</code> value.
0148: */
0149: public boolean nullsAreSortedHigh() throws SQLException {
0150: return true;
0151: }
0152:
0153: /**
0154: * Returns <code>false</code>, since <code>null</code> s are considered greater
0155: * than any non- <code>null</code> value.
0156: *
0157: * @see #nullsAreSortedHigh
0158: */
0159: public boolean nullsAreSortedLow() throws SQLException {
0160: return false;
0161: }
0162:
0163: /**
0164: * Returns <code>false</code>, since <code>null</code> s are considered greater
0165: * than any non- <code>null</code> value.
0166: *
0167: * @see #nullsAreSortedHigh
0168: */
0169: public boolean nullsAreSortedAtStart() throws SQLException {
0170: return false;
0171: }
0172:
0173: /**
0174: * Returns <code>false</code>, since <code>null</code> s are considered greater
0175: * than any non- <code>null</code> value.
0176: *
0177: * @see #nullsAreSortedHigh
0178: */
0179: public boolean nullsAreSortedAtEnd() throws SQLException {
0180: return false;
0181: }
0182:
0183: /**
0184: * Returns <code>false</code>, since Axion currently ignores case in identifiers,
0185: * and stores them internally as upper case values.
0186: */
0187: public boolean storesLowerCaseIdentifiers() throws SQLException {
0188: return false;
0189: }
0190:
0191: /**
0192: * Returns <code>false</code>, since Axion currently ignores case in identifiers.
0193: */
0194: public boolean supportsMixedCaseQuotedIdentifiers()
0195: throws SQLException {
0196: return false;
0197: }
0198:
0199: /**
0200: * Returns <code>false</code>, since Axion currently ignores case in identifiers,
0201: * and stores them internally as upper case values.
0202: */
0203: public boolean storesMixedCaseQuotedIdentifiers()
0204: throws SQLException {
0205: return false;
0206: }
0207:
0208: /**
0209: * Returns <code>true</code>, since Axion currently ignores case in identifiers,
0210: * and stores them internally as upper case values.
0211: */
0212: public boolean storesUpperCaseIdentifiers() throws SQLException {
0213: return true;
0214: }
0215:
0216: /**
0217: * Returns <code>false</code>, since Axion currently ignores case in identifiers,
0218: * and stores them internally as upper case values. Quoted identifiers are also
0219: * currently unsupported.
0220: */
0221: public boolean storesLowerCaseQuotedIdentifiers()
0222: throws SQLException {
0223: return false;
0224: }
0225:
0226: /**
0227: * Returns <code>false</code>, since Axion currently ignores case in identifiers,
0228: * and stores them internally as upper case values.
0229: */
0230: public boolean storesMixedCaseIdentifiers() throws SQLException {
0231: return false;
0232: }
0233:
0234: /**
0235: * Returns <code>0</code>, since Axion has no hard limit on the size of a row.
0236: */
0237: public int getMaxRowSize() throws SQLException {
0238: return 0;
0239: }
0240:
0241: /**
0242: * Returns <code>0</code>, since Axion has no hard limit on the size of a
0243: * statement.
0244: */
0245: public int getMaxStatementLength() throws SQLException {
0246: return 0;
0247: }
0248:
0249: /**
0250: * Returns <code>0</code>, since Axion has no hard limit on the number of
0251: * connections.
0252: */
0253: public int getMaxConnections() throws SQLException {
0254: return 0;
0255: }
0256:
0257: /**
0258: * Returns <code>Integer.MAX_VALUE</code>, since Axion has no hard limit on the
0259: * length of a column name.
0260: */
0261: public int getMaxColumnNameLength() throws SQLException {
0262: return Integer.MAX_VALUE;
0263: }
0264:
0265: /**
0266: * Returns <code>1</code>, since Axion currently doesn't support multi-column
0267: * indices.
0268: */
0269: public int getMaxColumnsInIndex() throws SQLException {
0270: return 1; // 0 when we support multi-column indices
0271: }
0272:
0273: /**
0274: * Returns {@link java.lang.Integer#MAX_VALUE}, the maximum number of tables Axion
0275: * can manage in a single SELECT statement.
0276: */
0277: public int getMaxTablesInSelect() throws SQLException {
0278: return Integer.MAX_VALUE;
0279: }
0280:
0281: /**
0282: * Returns {@link java.lang.Integer#MAX_VALUE}, the maximum number of columns Axion
0283: * can manage in a single ORDER BY clause.
0284: */
0285: public int getMaxColumnsInOrderBy() throws SQLException {
0286: return Integer.MAX_VALUE;
0287: }
0288:
0289: /**
0290: * Returns {@link java.lang.Integer#MAX_VALUE}, the maximum number of columns Axion
0291: * can manage in a single SELECT clause.
0292: */
0293: public int getMaxColumnsInSelect() throws SQLException {
0294: return Integer.MAX_VALUE;
0295: }
0296:
0297: /**
0298: * Returns {@link java.lang.Integer#MAX_VALUE}, the maximum number of columns Axion
0299: * can manage in a single table.
0300: */
0301: public int getMaxColumnsInTable() throws SQLException {
0302: return Integer.MAX_VALUE;
0303: }
0304:
0305: /**
0306: * Returns 0.
0307: */
0308: public int getMaxColumnsInGroupBy() throws SQLException {
0309: return 0;
0310: }
0311:
0312: /**
0313: * Returns <code>false</code> since UNION queries are currently not supported..
0314: */
0315: public boolean supportsUnion() throws SQLException {
0316: return false;
0317: }
0318:
0319: /** Returns <code>0</code>. */
0320: public int getMaxSchemaNameLength() throws SQLException {
0321: return 0;
0322: }
0323:
0324: /** Returns <code>0</code>. */
0325: public int getMaxStatements() throws SQLException {
0326: return 0;
0327: }
0328:
0329: /** Returns <code>Integer.MAX_VALUE</code>. */
0330: public int getMaxTableNameLength() throws SQLException {
0331: return Integer.MAX_VALUE;
0332: }
0333:
0334: /** Returns <code>0</code>. */
0335: public int getMaxUserNameLength() throws SQLException {
0336: return 0;
0337: }
0338:
0339: /** Returns <code>0</code>. */
0340: public int getMaxBinaryLiteralLength() throws SQLException {
0341: return 0;
0342: }
0343:
0344: /** Returns <code>0</code>. */
0345: public int getMaxCharLiteralLength() throws SQLException {
0346: return 0;
0347: }
0348:
0349: /** Returns <code>0</code>. */
0350: public int getMaxIndexLength() throws SQLException {
0351: return 0;
0352: }
0353:
0354: /** Returns <code>0</code>. */
0355: public int getMaxProcedureNameLength() throws SQLException {
0356: return 0;
0357: }
0358:
0359: /** Returns <code>0</code>. */
0360: public int getMaxCatalogNameLength() throws SQLException {
0361: return 0;
0362: }
0363:
0364: /** Returns {@link Connection#TRANSACTION_SERIALIZABLE}. */
0365: public int getDefaultTransactionIsolation() throws SQLException {
0366: return Connection.TRANSACTION_SERIALIZABLE;
0367: }
0368:
0369: /** Returns the connect string used to establish my {@link Connection}. */
0370: public String getURL() throws SQLException {
0371: return _connection.getURL();
0372: }
0373:
0374: /** Returns <code>false</code> as this feature is currently not supported. */
0375: public boolean supportsSelectForUpdate() throws SQLException {
0376: return false;
0377: }
0378:
0379: /** Returns <code>false</code> as this feature is currently not supported. */
0380: public boolean supportsStoredProcedures() throws SQLException {
0381: return false;
0382: }
0383:
0384: /** Returns <code>true</code> since you could use id = {sub-select}. */
0385: public boolean supportsSubqueriesInComparisons()
0386: throws SQLException {
0387: return true;
0388: }
0389:
0390: /** Returns <code>true</code> */
0391: public boolean supportsSubqueriesInExists() throws SQLException {
0392: return true;
0393: }
0394:
0395: /** Returns <code>true</code> */
0396: public boolean supportsSubqueriesInIns() throws SQLException {
0397: return true;
0398: }
0399:
0400: /** Returns <code>true</code> as this feature is currently supported. */
0401: public boolean supportsSubqueriesInQuantifieds()
0402: throws SQLException {
0403: return false; // ANY, ALL, SOME etc.
0404: }
0405:
0406: /** Returns <code>false</code> as this feature is currently not supported. */
0407: public boolean supportsAlterTableWithDropColumn()
0408: throws SQLException {
0409: return true;
0410: }
0411:
0412: /** Returns <code>true</code> as this feature is currently supported. */
0413: public boolean supportsAlterTableWithAddColumn()
0414: throws SQLException {
0415: return true;
0416: }
0417:
0418: /** Returns <code>false</code> as this feature is currently not supported. */
0419: public boolean supportsSchemasInDataManipulation()
0420: throws SQLException {
0421: return false;
0422: }
0423:
0424: /** Returns <code>false</code> as this feature is currently not supported. */
0425: public boolean supportsSchemasInProcedureCalls()
0426: throws SQLException {
0427: return false;
0428: }
0429:
0430: /** Returns <code>false</code> as this feature is currently not supported. */
0431: public boolean supportsSchemasInIndexDefinitions()
0432: throws SQLException {
0433: return false;
0434: }
0435:
0436: /** Returns <code>false</code> as this feature is currently not supported. */
0437: public boolean supportsCatalogsInDataManipulation()
0438: throws SQLException {
0439: return false;
0440: }
0441:
0442: /** Returns <code>false</code> as this feature is currently not supported. */
0443: public boolean supportsCatalogsInProcedureCalls()
0444: throws SQLException {
0445: return false;
0446: }
0447:
0448: /** Returns <code>false</code> as this feature is currently not supported. */
0449: public boolean supportsCatalogsInTableDefinitions()
0450: throws SQLException {
0451: return false;
0452: }
0453:
0454: /** Returns <code>false</code> as this feature is currently not supported. */
0455: public boolean supportsCatalogsInIndexDefinitions()
0456: throws SQLException {
0457: return false;
0458: }
0459:
0460: /** Returns <code>false</code> as this feature is currently not supported. */
0461: public boolean supportsCatalogsInPrivilegeDefinitions()
0462: throws SQLException {
0463: return false;
0464: }
0465:
0466: /** Is some form of "GROUP BY" clause supported? Returns <code>true</code> */
0467: public boolean supportsGroupBy() throws SQLException {
0468: return true;
0469: }
0470:
0471: /** Can a "GROUP BY" clause use columns not in the SELECT? Returns <code>true</code> */
0472: public boolean supportsGroupByUnrelated() throws SQLException {
0473: return true;
0474: }
0475:
0476: /**
0477: * Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the
0478: * columns in the SELECT? Returns <code>true</code>
0479: */
0480: public boolean supportsGroupByBeyondSelect() throws SQLException {
0481: return true;
0482: }
0483:
0484: /** Returns <code>true</code>. */
0485: public boolean supportsOuterJoins() throws SQLException {
0486: return true;
0487: }
0488:
0489: /** Returns <code>false</code>. */
0490: public boolean supportsFullOuterJoins() throws SQLException {
0491: return false;
0492: }
0493:
0494: /** Returns <code>true</code>. */
0495: public boolean supportsLimitedOuterJoins() throws SQLException {
0496: return true;
0497: }
0498:
0499: /** Returns <code>true</code>, since Axion allows arbitrary columns in an ORDER BY. */
0500: public boolean supportsOrderByUnrelated() throws SQLException {
0501: return true;
0502: }
0503:
0504: /** Returns <code>true</code>, since Axion supports transactions. */
0505: public boolean supportsTransactions() throws SQLException {
0506: return true;
0507: }
0508:
0509: /**
0510: * Returns <code>true</code> iff <i>level </i> is
0511: * {@link Connection#TRANSACTION_SERIALIZABLE}since Axion supports
0512: * TRANSACTION_SERIALIZABLE transactions only.
0513: */
0514: public boolean supportsTransactionIsolationLevel(int level)
0515: throws SQLException {
0516: switch (level) {
0517: case Connection.TRANSACTION_SERIALIZABLE:
0518: return true;
0519: case Connection.TRANSACTION_NONE:
0520: case Connection.TRANSACTION_READ_COMMITTED:
0521: case Connection.TRANSACTION_READ_UNCOMMITTED:
0522: case Connection.TRANSACTION_REPEATABLE_READ:
0523: return false;
0524: default:
0525: return false;
0526: }
0527: }
0528:
0529: /** Returns <code>true</code>; use CAST(col AS type) */
0530: public boolean supportsConvert() throws SQLException {
0531: return true;
0532: }
0533:
0534: /** Returns <code>false</code> as this feature is currently not supported. */
0535: public boolean supportsConvert(int fromType, int toType)
0536: throws SQLException {
0537: // we can implement this if we are populating int
0538: // value of data type correctly
0539: return false;
0540: }
0541:
0542: /** Returns <code>false</code> as this feature is currently not supported. */
0543: public boolean supportsUnionAll() throws SQLException {
0544: return false;
0545: }
0546:
0547: /** Returns <code>true</code> as Axion supports table aliasing. */
0548: public boolean supportsTableCorrelationNames() throws SQLException {
0549: return true;
0550: }
0551:
0552: /** Returns <code>true</code> as Axion supports table aliasing. */
0553: public boolean supportsDifferentTableCorrelationNames()
0554: throws SQLException {
0555: return true;
0556: }
0557:
0558: /** Returns <code>true</code>. */
0559: public boolean storesUpperCaseQuotedIdentifiers()
0560: throws SQLException {
0561: return true;
0562: }
0563:
0564: /**
0565: * Returns <code>true</code> as Axion supports the <a
0566: * href="http://msdn.microsoft.com/library/en-us/odbc/htm/odbcsql_minimum_grammar.asp">"ODBC
0567: * Minimum SQL Grammar" </a>. Namely:
0568: *
0569: * <pre>
0570: *
0571: *
0572: * CREATE TABLE base-table-name (column-identifier data-type [,column-identifier data-type]*)
0573: * DELETE FROM table-name [WHERE search-condition]
0574: * DROP TABLE base-table-name
0575: * INSERT INTO table-name [( column-identifier [, column-identifier]...)]
0576: * VALUES (insert-value[, insert-value]... )
0577: * SELECT [ALL | DISTINCT] select-list
0578: * FROM table-reference-list
0579: * [WHERE search-condition]
0580: * [order-by-clause]
0581: * UPDATE table-name SET column-identifier = {expression | NULL }
0582: * [, column-identifier = {expression | NULL}]*
0583: * [WHERE search-condition]
0584: *
0585: *
0586: * </pre>
0587: */
0588: public boolean supportsMinimumSQLGrammar() throws SQLException {
0589: return true;
0590: }
0591:
0592: /** Returns <code>true</code>. */
0593: public boolean nullPlusNonNullIsNull() throws SQLException {
0594: return true;
0595: }
0596:
0597: /**
0598: * Supported,
0599: */
0600: public ResultSet getColumns(String catalog, String schemaPattern,
0601: String tableNamePattern, String columnNamePattern)
0602: throws SQLException {
0603: Statement stmt = _connection.createStatement();
0604: String where = "";
0605: {
0606: StringBuffer buf = new StringBuffer();
0607: if (null != catalog) {
0608: buf.append("TABLE_CAT = '").append(
0609: catalog.toUpperCase()).append("'");
0610: }
0611: if (null != schemaPattern && !("%".equals(schemaPattern))) {
0612: if (buf.length() != 0) {
0613: buf.append(" AND ");
0614: }
0615: buf.append("TABLE_SCHEM LIKE '").append(
0616: schemaPattern.toUpperCase()).append("'");
0617: }
0618: if (null != tableNamePattern
0619: && !("%".equals(tableNamePattern))) {
0620: if (buf.length() != 0) {
0621: buf.append(" AND ");
0622: }
0623: buf.append("TABLE_NAME LIKE '").append(
0624: tableNamePattern.toUpperCase()).append("'");
0625: }
0626: if (null != columnNamePattern
0627: && !("%".equals(columnNamePattern))) {
0628: if (buf.length() != 0) {
0629: buf.append(" AND ");
0630: }
0631: buf.append("COLUMN_NAME LIKE '").append(
0632: columnNamePattern.toUpperCase()).append("'");
0633: }
0634: if (buf.length() > 0) {
0635: where = "WHERE " + buf.toString();
0636: }
0637: }
0638: ResultSet rset = stmt
0639: .executeQuery("select TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE, SCOPE_CATALOG, SCOPE_SCHEMA, SCOPE_TABLE, SOURCE_DATA_TYPE from AXION_COLUMNS "
0640: + where
0641: + " order by TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION");
0642: return rset;
0643: }
0644:
0645: /**
0646: * Supported.
0647: */
0648: public ResultSet getTables(String catalog, String schemaPattern,
0649: String tableNamePattern, String types[])
0650: throws SQLException {
0651: Statement stmt = _connection.createStatement();
0652: String where = "";
0653: StringBuffer buf = new StringBuffer();
0654: if (null != catalog) {
0655: buf.append("TABLE_CAT = '").append(catalog.toUpperCase())
0656: .append("'");
0657: }
0658: if (null != schemaPattern && !("%".equals(schemaPattern))) {
0659: if (buf.length() != 0) {
0660: buf.append(" AND ");
0661: }
0662: buf.append("TABLE_SCHEM LIKE '").append(
0663: schemaPattern.toUpperCase()).append("'");
0664: }
0665: if (null != tableNamePattern && !("%".equals(tableNamePattern))) {
0666: if (buf.length() != 0) {
0667: buf.append(" AND ");
0668: }
0669: buf.append("TABLE_NAME LIKE '").append(
0670: tableNamePattern.toUpperCase()).append("'");
0671: }
0672: if (null != types) {
0673: if (buf.length() != 0) {
0674: buf.append(" AND ");
0675: }
0676: buf.append("(");
0677: for (int i = 0; i < types.length; i++) {
0678: if (i != 0) {
0679: buf.append(" OR ");
0680: }
0681: buf.append(getTableTypePredicate(types[i]));
0682: }
0683: buf.append(")");
0684: }
0685: if (buf.length() != 0) {
0686: where = "WHERE " + buf.toString();
0687: }
0688: ResultSet rset = stmt
0689: .executeQuery("select TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS from AXION_TABLES "
0690: + where
0691: + " order by TABLE_TYPE, TABLE_SCHEM, TABLE_NAME");
0692: return rset;
0693: }
0694:
0695: /**
0696: * Gets appropriate predicate for search of Axion table types that are mapped to a
0697: * specific JDBC table type as defined in the JDBC API.
0698: *
0699: * @param jdbcTableType JDBC table type as defined in the DatabaseMetaData API
0700: * documentation; one of TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL
0701: * TEMPORARY, ALIAS, SYNONYM
0702: * @return appropriate predicate to apply against AXION_TABLES to narrow the query to
0703: * the desired set of tables.
0704: */
0705: private String getTableTypePredicate(String jdbcTableType) {
0706: StringBuffer buf = new StringBuffer(50);
0707: buf.append("TABLE_TYPE ");
0708:
0709: if ("TABLE".equals(jdbcTableType)) {
0710: buf.insert(0, "(");
0711: buf
0712: .append("LIKE '%TABLE' AND TABLE_TYPE <> 'SYSTEM TABLE'");
0713: buf.append(")");
0714: } else {
0715: buf.append("= '").append(jdbcTableType).append("'");
0716: }
0717:
0718: return buf.toString();
0719: }
0720:
0721: /** Supported. */
0722: public ResultSet getSchemas() throws SQLException {
0723: Statement stmt = _connection.createStatement();
0724: ResultSet rset = stmt
0725: .executeQuery("select TABLE_SCHEM from AXION_SCHEMATA ORDER BY TABLE_SCHEM");
0726: return rset;
0727: }
0728:
0729: /** Supported. */
0730: public ResultSet getCatalogs() throws SQLException {
0731: Statement stmt = _connection.createStatement();
0732: ResultSet rset = stmt
0733: .executeQuery("select TABLE_CAT from AXION_CATALOGS ORDER BY TABLE_CAT");
0734: return rset;
0735: }
0736:
0737: /** Supported. */
0738: public ResultSet getTableTypes() throws SQLException {
0739: Statement stmt = _connection.createStatement();
0740: ResultSet rset = stmt
0741: .executeQuery("select TABLE_TYPE from AXION_TABLE_TYPES order by TABLE_TYPE");
0742: return rset;
0743: }
0744:
0745: /** Supported. */
0746: public ResultSet getTypeInfo() throws SQLException {
0747: Statement stmt = _connection.createStatement();
0748: ResultSet rset = stmt
0749: .executeQuery("select TYPE_NAME, DATA_TYPE, PRECISION, LITERAL_PREFIX, LITERAL_SUFFIX, CREATE_PARAMS, NULLABLE, CASE_SENSITIVE, SEARCHABLE, UNSIGNED_ATTRIBUTE, FIXED_PREC_SCALE, AUTO_INCREMENT, LOCAL_TYPE_NAME, MINIMUM_SCALE, MAXIMUM_SCALE, SQL_DATA_TYPE, SQL_DATETIME_SUB, NUM_PREC_RADIX from AXION_TYPES order by DATA_TYPE");
0750: return rset;
0751: }
0752:
0753: /** Returns <code>false</code> as this feature is currently unsupported. */
0754: public boolean supportsMultipleResultSets() throws SQLException {
0755: return false;
0756: }
0757:
0758: /** Returns <code>true</code>, Axion supports multiple transactions. */
0759: public boolean supportsMultipleTransactions() throws SQLException {
0760: return true;
0761: }
0762:
0763: /** Returns <code>true</code>, Axion supports NOT NULL constraints. */
0764: public boolean supportsNonNullableColumns() throws SQLException {
0765: return true;
0766: }
0767:
0768: /**
0769: * Returns <code>true</code>.
0770: */
0771: public boolean supportsDataManipulationTransactionsOnly()
0772: throws SQLException {
0773: return true;
0774: }
0775:
0776: /**
0777: * Returns <code>false</code>. Closing a transaction will close any open
0778: * ResultSets.
0779: */
0780: public boolean supportsOpenCursorsAcrossCommit()
0781: throws SQLException {
0782: return false;
0783: }
0784:
0785: /**
0786: * Returns <code>false</code>. Closing a transaction will close any open
0787: * ResultSets.
0788: */
0789: public boolean supportsOpenCursorsAcrossRollback()
0790: throws SQLException {
0791: return false;
0792: }
0793:
0794: /**
0795: * Returns <code>true</code>. Statements remain valid accross a transaction
0796: * boundary.
0797: */
0798: public boolean supportsOpenStatementsAcrossCommit()
0799: throws SQLException {
0800: return true;
0801: }
0802:
0803: /**
0804: * Returns <code>true</code>. Statements remain valid accross a transaction
0805: * boundary.
0806: */
0807: public boolean supportsOpenStatementsAcrossRollback()
0808: throws SQLException {
0809: return true;
0810: }
0811:
0812: /**
0813: * Returns <code>false</code>, since Axion currently doesn't treat Data Definition
0814: * Language (DDL) statements like CREATE or DROP transactionally.
0815: */
0816: public boolean supportsDataDefinitionAndDataManipulationTransactions()
0817: throws SQLException {
0818: return false;
0819: }
0820:
0821: /**
0822: * Returns <code>false</code>, since Axion currently doesn't treat Data Definition
0823: * Language (DDL) statements like CREATE or DROP transactionally.
0824: */
0825: public boolean dataDefinitionCausesTransactionCommit()
0826: throws SQLException {
0827: return false;
0828: }
0829:
0830: /**
0831: * Returns <code>false</code>, since Axion currently doesn't treat Data Definition
0832: * Language (DDL) statements like CREATE or DROP transactionally.
0833: */
0834: public boolean dataDefinitionIgnoredInTransactions()
0835: throws SQLException {
0836: return false;
0837: }
0838:
0839: /**
0840: * Returns <code>false</code> since LOB sizes are not counted in the
0841: * {@link #getMaxRowSize maximum row size}(which is unbounded anyway).
0842: */
0843: public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
0844: return false;
0845: }
0846:
0847: /**
0848: * Returns <code>false</code>, since the driver does not require local files
0849: */
0850: public boolean usesLocalFiles() throws SQLException {
0851: return false;
0852: }
0853:
0854: /**
0855: * Returns <code>false</code>, since the driver does not require local files
0856: */
0857: public boolean usesLocalFilePerTable() throws SQLException {
0858: return false;
0859: }
0860:
0861: /** Returns <code>true</code>. */
0862: public boolean supportsExpressionsInOrderBy() throws SQLException {
0863: return true;
0864: }
0865:
0866: /** Returns <code>true</code>. */
0867: public boolean supportsCorrelatedSubqueries() throws SQLException {
0868: return true; // supports most subqueries
0869: }
0870:
0871: /** Returns <code>true</code> since this feature is currently supported. */
0872: public boolean supportsPositionedDelete() throws SQLException {
0873: return true; // using absolute(int i) and delete() in ResultSet
0874: }
0875:
0876: /** Returns <code>true</code> since this feature is currently supported. */
0877: public boolean supportsPositionedUpdate() throws SQLException {
0878: return true; // using absolute(int i) and updateXXX()
0879: }
0880:
0881: /** Returns <code>0</code> since named cursors are not supported. */
0882: public int getMaxCursorNameLength() throws SQLException {
0883: return 0;
0884: }
0885:
0886: /**
0887: * Returns <code>"</code> as Axion now supports quoted identifiers to allow for
0888: * escaping of reserved words for use as table or column identifiers.
0889: */
0890: public String getIdentifierQuoteString() throws SQLException {
0891: return "\"";
0892: }
0893:
0894: /**
0895: * Returns <code>true</code> iff <i>type </i> is supported and <i>concurrency </i>
0896: * is {@link ResultSet#CONCUR_READ_ONLY}or {@link ResultSet#CONCUR_UPDATABLE}.
0897: *
0898: * @param type ResultSet type to test
0899: * @param concurrency ResultSet concurrency to test
0900: * @return true if combination of <i>type </i> and <i>concurrency </i> is supported;
0901: * false otherwise
0902: */
0903: public boolean supportsResultSetConcurrency(int type,
0904: int concurrency) throws SQLException {
0905: if (supportsResultSetType(type)) {
0906: switch (concurrency) {
0907: case ResultSet.CONCUR_READ_ONLY:
0908: case ResultSet.CONCUR_UPDATABLE:
0909: return true;
0910:
0911: default:
0912: throw new SQLException(
0913: "Unknown ResultSet concurrency value: "
0914: + concurrency);
0915: }
0916: }
0917:
0918: return false;
0919: }
0920:
0921: /**
0922: * Returns <code>true</code> iff <i>type </i> is {@link ResultSet#TYPE_FORWARD_ONLY}
0923: * or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
0924: *
0925: * @param type ResultSet type to test
0926: * @return true if <i>type </i> is supported; false otherwise
0927: */
0928: public boolean supportsResultSetType(int type) throws SQLException {
0929: switch (type) {
0930: case ResultSet.TYPE_FORWARD_ONLY:
0931: case ResultSet.TYPE_SCROLL_SENSITIVE:
0932: return true;
0933:
0934: case ResultSet.TYPE_SCROLL_INSENSITIVE:
0935: return false;
0936:
0937: default:
0938: throw new SQLException("Unknown ResultSet type: " + type);
0939: }
0940: }
0941:
0942: /** Supported. */
0943: public boolean supportsANSI92EntryLevelSQL() throws SQLException {
0944: return true;
0945: }
0946:
0947: /** Supported. */
0948: public boolean supportsLikeEscapeClause() throws SQLException {
0949: return true;
0950: }
0951:
0952: /** Currently not supported. */
0953: public boolean supportsCoreSQLGrammar() throws SQLException {
0954: return false;
0955: }
0956:
0957: /** Currently not supported. */
0958: public ResultSet getPrimaryKeys(String catalog, String schema,
0959: String table) throws SQLException {
0960: throw new SQLException("getPrimaryKeys() is not supported"); // TODO: IMPLEMENT ME
0961: }
0962:
0963: /**
0964: * Partially supported.
0965: *
0966: * @return ResultSet containing index information as outlined in the JDBC API
0967: */
0968: public ResultSet getIndexInfo(String catalog, String schema,
0969: String table, boolean unique, boolean approximate)
0970: throws SQLException {
0971: Statement stmt = _connection.createStatement();
0972: String where = "";
0973: StringBuffer buf = new StringBuffer();
0974: if (null != catalog) {
0975: buf.append("TABLE_CAT = '").append(catalog).append("'");
0976: }
0977:
0978: if (null != schema && !("%".equals(schema))) {
0979: if (buf.length() != 0) {
0980: buf.append(" AND ");
0981: }
0982: buf.append("TABLE_SCHEM LIKE '").append(schema).append("'");
0983: }
0984:
0985: if (null != table && !("%".equals(table))) {
0986: if (buf.length() != 0) {
0987: buf.append(" AND ");
0988: }
0989: buf.append("TABLE_NAME LIKE '").append(table).append("'");
0990: }
0991:
0992: if (unique) {
0993: if (buf.length() != 0) {
0994: buf.append(" AND ");
0995: }
0996: buf.append("NON_UNIQUE = false");
0997: }
0998:
0999: if (buf.length() != 0) {
1000: where = "WHERE " + buf.toString();
1001: }
1002:
1003: ResultSet rset = stmt
1004: .executeQuery("select TABLE_CAT, TABLE_SCHEM, TABLE_NAME, NON_UNIQUE, "
1005: + "INDEX_QUALIFIER, INDEX_NAME, TYPE, ORDINAL_POSITION, COLUMN_NAME, ASC_OR_DESC, "
1006: + "CARDINALITY, PAGES, FILTER_CONDITION from AXION_INDEX_INFO "
1007: + where
1008: + " order by NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION");
1009: return rset;
1010:
1011: }
1012:
1013: //----------------------------
1014:
1015: /** Currently not supported. */
1016: public String getNumericFunctions() throws SQLException {
1017: throw new SQLException("getNumericFunctions() is not supported");
1018: }
1019:
1020: /** Currently not supported. */
1021: public String getSystemFunctions() throws SQLException {
1022: throw new SQLException("getSystemFunctions() is not supported");
1023: }
1024:
1025: /** Currently not supported. */
1026: public String getSQLKeywords() throws SQLException {
1027: throw new SQLException("getSQLKeywords() is not supported");
1028: }
1029:
1030: /** Currently not supported. */
1031: public String getSearchStringEscape() throws SQLException {
1032: throw new SQLException(
1033: "getSearchStringEscape() is not supported");
1034: }
1035:
1036: /** Currently not supported. */
1037: public String getStringFunctions() throws SQLException {
1038: throw new SQLException("getStringFunctions() is not supported");
1039: }
1040:
1041: /** Currently not supported. */
1042: public String getTimeDateFunctions() throws SQLException {
1043: throw new SQLException(
1044: "getTimeDateFunctions() is not supported");
1045: }
1046:
1047: /** Currently not supported. */
1048: public String getExtraNameCharacters() throws SQLException {
1049: throw new SQLException(
1050: "getExtraNameCharacters() is not supported");
1051: }
1052:
1053: /** Currently not supported. */
1054: public boolean supportsSchemasInTableDefinitions()
1055: throws SQLException {
1056: return false;
1057: }
1058:
1059: /** Currently not supported. */
1060: public boolean supportsExtendedSQLGrammar() throws SQLException {
1061: return false;
1062: }
1063:
1064: /** Currently not supported. */
1065: public boolean supportsSchemasInPrivilegeDefinitions()
1066: throws SQLException {
1067: return false;
1068: }
1069:
1070: /** Currently not supported. */
1071: public boolean supportsANSI92IntermediateSQL() throws SQLException {
1072: return false;
1073: }
1074:
1075: /** Currently not supported. */
1076: public boolean supportsANSI92FullSQL() throws SQLException {
1077: return false;
1078: }
1079:
1080: /** Currently not supported. */
1081: public boolean supportsIntegrityEnhancementFacility()
1082: throws SQLException {
1083: return false;
1084: }
1085:
1086: /** Currently not supported. */
1087: public String getSchemaTerm() throws SQLException {
1088: throw new SQLException("getSchemaTerm() is not supported");
1089: }
1090:
1091: /** Currently not supported. */
1092: public String getProcedureTerm() throws SQLException {
1093: throw new SQLException("getProcedureTerm() is not supported");
1094: }
1095:
1096: /** Currently not supported. */
1097: public String getCatalogTerm() throws SQLException {
1098: throw new SQLException("getCatalogTerm() is not supported");
1099: }
1100:
1101: /** Currently not supported. */
1102: public boolean isCatalogAtStart() throws SQLException {
1103: throw new SQLException("isCatalogAtStart() is not supported");
1104: }
1105:
1106: /** Currently not supported. */
1107: public String getCatalogSeparator() throws SQLException {
1108: throw new SQLException("getCatalogSeparator() is not supported");
1109: }
1110:
1111: /** Currently not supported. */
1112: public ResultSet getProcedures(String catalog,
1113: String schemaPattern, String procedureNamePattern)
1114: throws SQLException {
1115: throw new SQLException("getProcedures() is not supported");
1116: }
1117:
1118: /** Currently not supported. */
1119: public ResultSet getProcedureColumns(String catalog,
1120: String schemaPattern, String procedureNamePattern,
1121: String columnNamePattern) throws SQLException {
1122: throw new SQLException("getProcedureColumns() is not supported");
1123: }
1124:
1125: /** Currently not supported. */
1126: public ResultSet getColumnPrivileges(String catalog, String schema,
1127: String table, String columnNamePattern) throws SQLException {
1128: throw new SQLException("getColumnPrivileges() is not supported");
1129: }
1130:
1131: /** Currently not supported. */
1132: public ResultSet getTablePrivileges(String catalog,
1133: String schemaPattern, String tableNamePattern)
1134: throws SQLException {
1135: throw new SQLException("getTablePrivileges() is not supported");
1136: }
1137:
1138: /** Currently not supported. */
1139: public ResultSet getBestRowIdentifier(String catalog,
1140: String schema, String table, int scope, boolean nullable)
1141: throws SQLException {
1142: throw new SQLException(
1143: "getBestRowIdentifier() is not supported");
1144: }
1145:
1146: /** Currently not supported. */
1147: public ResultSet getVersionColumns(String catalog, String schema,
1148: String table) throws SQLException {
1149: throw new SQLException("getVersionColumns() is not supported");
1150: }
1151:
1152: /** Currently not supported. */
1153: public ResultSet getImportedKeys(String catalog, String schema,
1154: String table) throws SQLException {
1155: throw new SQLException("getImportedKeys() is not supported");
1156: }
1157:
1158: /** Currently not supported. */
1159: public ResultSet getExportedKeys(String catalog, String schema,
1160: String table) throws SQLException {
1161: throw new SQLException("getExportedKeys() is not supported");
1162: }
1163:
1164: /** Currently not supported. */
1165: public ResultSet getCrossReference(String primaryCatalog,
1166: String primarySchema, String primaryTable,
1167: String foreignCatalog, String foreignSchema,
1168: String foreignTable) throws SQLException {
1169: throw new SQLException("getCrossReference() is not supported");
1170: }
1171:
1172: /**
1173: * Retrieves whether for the given type of ResultSet object, the result set's own updates
1174: * are visible.
1175: *
1176: * @param type the ResultSet type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1177: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <coee>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1178: * @return true for TYPE_SCROLL_SENSITIVE or TYPE_FORWARD_ONLY, false for TYPE_SCROLL_INSENSITIVE
1179: *
1180: * @throws SQLException if a database access error occurs
1181: */
1182: public boolean ownUpdatesAreVisible(int type) throws SQLException {
1183: return supportsResultSetType(type);
1184: }
1185:
1186: /**
1187: * Retrieves whether for the given type of ResultSet object, the result set's own deletes
1188: * are visible.
1189: *
1190: * @param type the ResultSet type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1191: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <coee>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1192: * @return true for TYPE_SCROLL_SENSITIVE or TYPE_FORWARD_ONLY, false for TYPE_SCROLL_INSENSITIVE
1193: *
1194: * @throws SQLException if a database access error occurs
1195: */
1196: public boolean ownDeletesAreVisible(int type) throws SQLException {
1197: return supportsResultSetType(type);
1198: }
1199:
1200: /** Currently supported. */
1201: public boolean ownInsertsAreVisible(int type) throws SQLException {
1202: return supportsResultSetType(type);
1203: }
1204:
1205: /** Currently not supported. */
1206: public boolean othersUpdatesAreVisible(int type)
1207: throws SQLException {
1208: return false;
1209: }
1210:
1211: /** Currently not supported. */
1212: public boolean othersDeletesAreVisible(int type)
1213: throws SQLException {
1214: return false;
1215: }
1216:
1217: /** Currently not supported. */
1218: public boolean othersInsertsAreVisible(int type)
1219: throws SQLException {
1220: return false;
1221: }
1222:
1223: /**
1224: * Retrieves whether or not a visible row update can be detected by calling the method
1225: * {@link ResultSet.rowUpdated}. As ResultSet.rowUpdated is not supported, this method
1226: * should return false.
1227: *
1228: * @param type the ResultSet type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1229: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <coee>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1230: * @return false as Axion does not (yet) support rowUpdated()
1231: *
1232: * @throws SQLException if a database access error occurs
1233: */
1234: public boolean updatesAreDetected(int type) throws SQLException {
1235: switch (type) {
1236: case ResultSet.TYPE_FORWARD_ONLY:
1237: case ResultSet.TYPE_SCROLL_SENSITIVE:
1238: case ResultSet.TYPE_SCROLL_INSENSITIVE:
1239: return false;
1240:
1241: default:
1242: throw new SQLException("Unknown ResultSet type: " + type);
1243: }
1244: }
1245:
1246: /** Currently not supported. */
1247: public boolean deletesAreDetected(int type) throws SQLException {
1248: return false;
1249: }
1250:
1251: /**
1252: * Retrieves whether or not a visible row insert can be detected by calling the method
1253: * {@link ResultSet.rowInserted}. As ResultSet.rowInserted is not supported, this method
1254: * should return false.
1255: *
1256: * @param type the ResultSet type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
1257: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <coee>ResultSet.TYPE_SCROLL_SENSITIVE</code>
1258: * @return false as Axion does not (yet) support rowInserted()
1259: *
1260: * @throws SQLException if a database access error occurs
1261: */
1262: public boolean insertsAreDetected(int type) throws SQLException {
1263: switch (type) {
1264: case ResultSet.TYPE_FORWARD_ONLY:
1265: case ResultSet.TYPE_SCROLL_SENSITIVE:
1266: case ResultSet.TYPE_SCROLL_INSENSITIVE:
1267: return false;
1268:
1269: default:
1270: throw new SQLException("Unknown ResultSet type: " + type);
1271: }
1272: }
1273:
1274: /** Currently not supported. */
1275: public ResultSet getUDTs(String catalog, String schemaPattern,
1276: String typeNamePattern, int[] types) throws SQLException {
1277: throw new SQLException("getUDTs() is not supported");
1278: }
1279:
1280: private AxionConnection _connection = null;
1281: private Database _db = null;
1282: private static final String AXION_VERSION = "1.0M4-dev"; // XXX CHANGE ME ON RELEASE
1283: private static final int DB_MAJOR_VERSION = 0;
1284: private static final int DB_MINOR_VERSION = 3;
1285:
1286: public int getDatabaseMajorVersion() throws SQLException {
1287: return DB_MAJOR_VERSION;
1288: }
1289:
1290: public int getDatabaseMinorVersion() throws SQLException {
1291: return DB_MINOR_VERSION;
1292: }
1293:
1294: /** Always empty, super tables are currently not supported. */
1295: public ResultSet getSuperTables(String arg0, String arg1,
1296: String arg2) throws SQLException {
1297: return AxionResultSet.createEmptyResultSet(null);
1298: }
1299:
1300: /** Always empty, super types are currently not supported. */
1301: public ResultSet getSuperTypes(String arg0, String arg1, String arg2)
1302: throws SQLException {
1303: return AxionResultSet.createEmptyResultSet(null);
1304: }
1305:
1306: /** Currently always false. */
1307: public boolean supportsGetGeneratedKeys() throws SQLException {
1308: return false;
1309: }
1310:
1311: /** Currently always false. */
1312: public boolean supportsMultipleOpenResults() throws SQLException {
1313: // per the javadoc, this refers to CallableStatements, which we
1314: // don't support at all
1315: return false;
1316: }
1317:
1318: /** Currently always false. */
1319: public boolean supportsNamedParameters() throws SQLException {
1320: // per the javadoc, this refers to CallableStatements, which we
1321: // don't support at all
1322: return false;
1323: }
1324:
1325: /** Currently always false. */
1326: public boolean supportsSavepoints() throws SQLException {
1327: return false;
1328: }
1329:
1330: /** Currently always false. */
1331: public boolean supportsStatementPooling() throws SQLException {
1332: return false;
1333: }
1334:
1335: public int getResultSetHoldability() throws SQLException {
1336: return ResultSet.CLOSE_CURSORS_AT_COMMIT;
1337: }
1338:
1339: public boolean supportsResultSetHoldability(int code)
1340: throws SQLException {
1341: if (ResultSet.CLOSE_CURSORS_AT_COMMIT == code) {
1342: return true;
1343: }
1344: return false;
1345: }
1346:
1347: /** Currently unsupported. */
1348: public ResultSet getAttributes(String arg0, String arg1,
1349: String arg2, String arg3) throws SQLException {
1350: throw new UnsupportedOperationException(
1351: "getAttributes is currently not supported");
1352: }
1353:
1354: /** Supported. */
1355: public int getJDBCMajorVersion() throws SQLException {
1356: return 3;
1357: }
1358:
1359: /** Supported. */
1360: public int getJDBCMinorVersion() throws SQLException {
1361: return 0;
1362: }
1363:
1364: /** Currently unsupported. */
1365: public int getSQLStateType() throws SQLException {
1366: // We already started supporting the SQL state
1367: throw new SQLException(
1368: "getSQLStateType is currently not supported");
1369: }
1370:
1371: /** Currently unsupported. */
1372: public boolean locatorsUpdateCopy() throws SQLException {
1373: throw new SQLException(
1374: "locatorsUpdateCopy is currently not supported");
1375: }
1376:
1377: @Override
1378: public boolean autoCommitFailureClosesAllResultSets()
1379: throws SQLException {
1380: throw new SQLException("Not supported");
1381: }
1382:
1383: @Override
1384: public ResultSet getClientInfoProperties() throws SQLException {
1385: throw new SQLException("Not supported");
1386: }
1387:
1388: @Override
1389: public ResultSet getFunctionColumns(String arg0, String arg1,
1390: String arg2, String arg3) throws SQLException {
1391: throw new SQLException("Not supported");
1392: }
1393:
1394: @Override
1395: public ResultSet getFunctions(String arg0, String arg1, String arg2)
1396: throws SQLException {
1397: throw new SQLException("Not supported");
1398: }
1399:
1400: @Override
1401: public RowIdLifetime getRowIdLifetime() throws SQLException {
1402: throw new SQLException("Not supported");
1403: }
1404:
1405: @Override
1406: public ResultSet getSchemas(String arg0, String arg1)
1407: throws SQLException {
1408: throw new SQLException("Not supported");
1409: }
1410:
1411: @Override
1412: public boolean supportsStoredFunctionsUsingCallSyntax()
1413: throws SQLException {
1414: throw new SQLException("Not supported");
1415: }
1416:
1417: @Override
1418: public boolean isWrapperFor(Class<?> arg0) throws SQLException {
1419: throw new SQLException("Not supported");
1420: }
1421:
1422: @Override
1423: public <T> T unwrap(Class<T> arg0) throws SQLException {
1424: throw new SQLException("Not supported");
1425: }
1426: }
|