📄 csvdatabasemetadata.java
字号:
/*
* CsvJdbc - a JDBC driver for CSV files
* Copyright (C) 2001 Jonathan Ackerman
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.relique.jdbc.csv;
import java.sql.*;
/**
*This class will implement the DatabaseMetaData interface for the CsvJdbc driver.
* This is mostly stub.
*
* @author Jonathan Ackerman
* @created 25 November 2001
* @version $Id: CsvDatabaseMetaData.java,v 1.3 2004/08/09 05:02:03 jackerm Exp $
*/
public class CsvDatabaseMetaData implements DatabaseMetaData
{
private Connection createdByConnection;
public CsvDatabaseMetaData(Connection createdByConnection)
{
this.createdByConnection = createdByConnection;
}
public boolean allProceduresAreCallable() throws SQLException
{
return true;
}
public boolean allTablesAreSelectable() throws SQLException
{
return true;
}
public boolean dataDefinitionCausesTransactionCommit() throws SQLException
{
return false;
}
public boolean dataDefinitionIgnoredInTransactions() throws SQLException
{
return false;
}
public boolean deletesAreDetected(int arg0) throws SQLException
{
return false;
}
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException
{
return false;
}
public ResultSet getAttributes(String arg0, String arg1, String arg2, String arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getAttributes(String,String,String,String) unsupported");
}
public ResultSet getBestRowIdentifier(String arg0, String arg1, String arg2, int arg3, boolean arg4) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getBestRowIdentifier(String,String,String,int,boolean) unsupported");
}
public ResultSet getCatalogs() throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getCatalogs() unsupported");
}
public String getCatalogSeparator() throws SQLException
{
return ".";
}
public String getCatalogTerm() throws SQLException
{
return "catalog";
}
public ResultSet getColumnPrivileges(String arg0, String arg1, String arg2, String arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getColumnPrivileges(String,String,String,String) unsupported");
}
public ResultSet getColumns(String arg0, String arg1, String arg2, String arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getColumns(String,String,String,String) unsupported");
}
public Connection getConnection() throws SQLException
{
return createdByConnection;
}
public ResultSet getCrossReference(String arg0, String arg1, String arg2, String arg3, String arg4, String arg5)
throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getCrossReference(String,String,String,String,String,String) unsupported");
}
public int getDatabaseMajorVersion() throws SQLException
{
return 1;
}
public int getDatabaseMinorVersion() throws SQLException
{
return 0;
}
public String getDatabaseProductName() throws SQLException
{
return "CsvJdbc";
}
public String getDatabaseProductVersion() throws SQLException
{
return "1";
}
public int getDefaultTransactionIsolation() throws SQLException
{
return java.sql.Connection.TRANSACTION_NONE;
}
public int getDriverMajorVersion()
{
return 1;
}
public int getDriverMinorVersion()
{
return 0;
}
public String getDriverName() throws SQLException
{
return "CsvJdbc";
}
public String getDriverVersion() throws SQLException
{
return "1";
}
public ResultSet getExportedKeys(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getExportedKeys(String,String,String) unsupported");
}
public String getExtraNameCharacters() throws SQLException
{
return "";
}
public String getIdentifierQuoteString() throws SQLException
{
return " ";
}
public ResultSet getImportedKeys(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getImportedKeys(String,String,String) unsupported");
}
public ResultSet getIndexInfo(String arg0, String arg1, String arg2, boolean arg3, boolean arg4) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getIndexInfo(String,String,String,boolean,boolean) unsupported");
}
public int getJDBCMajorVersion() throws SQLException
{
return 3;
}
public int getJDBCMinorVersion() throws SQLException
{
return 0;
}
public int getMaxBinaryLiteralLength() throws SQLException
{
return 0;
}
public int getMaxCatalogNameLength() throws SQLException
{
return 0;
}
public int getMaxCharLiteralLength() throws SQLException
{
return 0;
}
public int getMaxColumnNameLength() throws SQLException
{
return 0;
}
public int getMaxColumnsInGroupBy() throws SQLException
{
return 0;
}
public int getMaxColumnsInIndex() throws SQLException
{
return 0;
}
public int getMaxColumnsInOrderBy() throws SQLException
{
return 0;
}
public int getMaxColumnsInSelect() throws SQLException
{
return 0;
}
public int getMaxColumnsInTable() throws SQLException
{
return 0;
}
public int getMaxConnections() throws SQLException
{
return 0;
}
public int getMaxCursorNameLength() throws SQLException
{
return 0;
}
public int getMaxIndexLength() throws SQLException
{
return 0;
}
public int getMaxProcedureNameLength() throws SQLException
{
return 0;
}
public int getMaxRowSize() throws SQLException
{
return 0;
}
public int getMaxSchemaNameLength() throws SQLException
{
return 0;
}
public int getMaxStatementLength() throws SQLException
{
return 0;
}
public int getMaxStatements() throws SQLException
{
return 0;
}
public int getMaxTableNameLength() throws SQLException
{
return 0;
}
public int getMaxTablesInSelect() throws SQLException
{
return 0;
}
public int getMaxUserNameLength() throws SQLException
{
return 0;
}
public String getNumericFunctions() throws SQLException
{
return "";
}
public ResultSet getPrimaryKeys(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getPrimaryKeys(String,String,String) unsupported");
}
public ResultSet getProcedureColumns(String arg0, String arg1, String arg2, String arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getProcedureColumns(String,String,String,String) unsupported");
}
public ResultSet getProcedures(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getProcedures(String,String,String) unsupported");
}
public String getProcedureTerm() throws SQLException
{
return "procedure";
}
public int getResultSetHoldability() throws SQLException
{
return java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT;
}
public ResultSet getSchemas() throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getSchemas() unsupported");
}
public String getSchemaTerm() throws SQLException
{
return "schema";
}
public String getSearchStringEscape() throws SQLException
{
return "_";
}
public String getSQLKeywords() throws SQLException
{
return "";
}
public int getSQLStateType() throws SQLException
{
return sqlStateSQL99;
}
public String getStringFunctions() throws SQLException
{
return "";
}
public ResultSet getSuperTables(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getSchemas(String,String,String) unsupported");
}
public ResultSet getSuperTypes(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getSchemas(String,String,String) unsupported");
}
public String getSystemFunctions() throws SQLException
{
return "";
}
public ResultSet getTablePrivileges(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getTablePrivileges(String,String,String) unsupported");
}
public ResultSet getTables(String arg0, String arg1, String arg2, String[] arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getTablePrivileges(String,String,String,String[]) unsupported");
}
public ResultSet getTableTypes() throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getTableTypes() unsupported");
}
public String getTimeDateFunctions() throws SQLException
{
return "";
}
public ResultSet getTypeInfo() throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getTypeInfo() unsupported");
}
public ResultSet getUDTs(String arg0, String arg1, String arg2, int[] arg3) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getUDTs(String,String,String,int[]) unsupported");
}
public String getURL() throws SQLException
{
return null;
}
public String getUserName() throws SQLException
{
return "unknown";
}
public ResultSet getVersionColumns(String arg0, String arg1, String arg2) throws SQLException
{
throw new UnsupportedOperationException("DatabaseMetaData.getVersionColumns(String,String,String) unsupported");
}
public boolean insertsAreDetected(int arg0) throws SQLException
{
return false;
}
public boolean isCatalogAtStart() throws SQLException
{
return true;
}
public boolean isReadOnly() throws SQLException
{
return true;
}
public boolean locatorsUpdateCopy() throws SQLException
{
return false;
}
public boolean nullPlusNonNullIsNull() throws SQLException
{
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -