abstractjdbc1databasemetadata.java
来自「PostgreSQL7.4.6 for Linux」· Java 代码 · 共 2,128 行 · 第 1/5 页
JAVA
2,128 行
Driver.debug("storesMixedCaseQuotedIdentifiers " + false); return false; } /* * What is the string used to quote SQL identifiers? This returns * a space if identifier quoting isn't supported. A JDBC Compliant * driver will always use a double quote character. * * @return the quoting string * @exception SQLException if a database access error occurs */ public String getIdentifierQuoteString() throws SQLException { if (Driver.logDebug) Driver.debug("getIdentifierQuoteString \"" ); return "\""; } /* * Get a comma separated list of all a database's SQL keywords that * are NOT also SQL92 keywords. * * <p>Within PostgreSQL, the keywords are found in * src/backend/parser/keywords.c * * <p>For SQL Keywords, I took the list provided at * <a href="http://web.dementia.org/~shadow/sql/sql3bnf.sep93.txt"> * http://web.dementia.org/~shadow/sql/sql3bnf.sep93.txt</a> * which is for SQL3, not SQL-92, but it is close enough for * this purpose. * * @return a comma separated list of keywords we use * @exception SQLException if a database access error occurs */ public String getSQLKeywords() throws SQLException { return keywords; } public String getNumericFunctions() throws SQLException { if (Driver.logDebug) Driver.debug("getNumericFunctions"); return ""; } public String getStringFunctions() throws SQLException { if (Driver.logDebug) Driver.debug("getStringFunctions"); return ""; } public String getSystemFunctions() throws SQLException { if (Driver.logDebug) Driver.debug("getSystemFunctions"); return ""; } public String getTimeDateFunctions() throws SQLException { if (Driver.logDebug) Driver.debug("getTimeDateFunctions"); return ""; } /* * This is the string that can be used to escape '_' and '%' in * a search string pattern style catalog search parameters * * @return the string used to escape wildcard characters * @exception SQLException if a database access error occurs */ public String getSearchStringEscape() throws SQLException { if (Driver.logDebug) Driver.debug("getSearchStringEscape"); return "\\\\"; } /* * Get all the "extra" characters that can be used in unquoted * identifier names (those beyond a-zA-Z0-9 and _) * * <p>From the file src/backend/parser/scan.l, an identifier is * {letter}{letter_or_digit} which makes it just those listed * above. * * @return a string containing the extra characters * @exception SQLException if a database access error occurs */ public String getExtraNameCharacters() throws SQLException { if (Driver.logDebug) Driver.debug("getExtraNameCharacters"); return ""; } /* * Is "ALTER TABLE" with an add column supported? * Yes for PostgreSQL 6.1 * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithAddColumn() throws SQLException { if (Driver.logDebug) Driver.debug("supportsAlterTableWithAddColumn " + true); return true; } /* * Is "ALTER TABLE" with a drop column supported? * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithDropColumn() throws SQLException { boolean dropColumn = connection.haveMinimumServerVersion("7.3"); if (Driver.logDebug) Driver.debug("supportsAlterTableWithDropColumn " + dropColumn); return dropColumn; } /* * Is column aliasing supported? * * <p>If so, the SQL AS clause can be used to provide names for * computed columns or to provide alias names for columns as * required. A JDBC Compliant driver always returns true. * * <p>e.g. * * <br><pre> * select count(C) as C_COUNT from T group by C; * * </pre><br> * should return a column named as C_COUNT instead of count(C) * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsColumnAliasing() throws SQLException { if (Driver.logDebug) Driver.debug("supportsColumnAliasing " + true); return true; } /* * Are concatenations between NULL and non-NULL values NULL? A * JDBC Compliant driver always returns true * * @return true if so * @exception SQLException if a database access error occurs */ public boolean nullPlusNonNullIsNull() throws SQLException { if (Driver.logDebug) Driver.debug("nullPlusNonNullIsNull " + true); return true; } public boolean supportsConvert() throws SQLException { if (Driver.logDebug) Driver.debug("supportsConvert " + false); return false; } public boolean supportsConvert(int fromType, int toType) throws SQLException { if (Driver.logDebug) Driver.debug("supportsConvert " + false); return false; } /* * Are table correlation names supported? A JDBC Compliant * driver always returns true. * * @return true if so; false otherwise * @exception SQLException - if a database access error occurs */ public boolean supportsTableCorrelationNames() throws SQLException { if (Driver.logDebug) Driver.debug("supportsTableCorrelationNames " + true); return true; } /* * If table correlation names are supported, are they restricted to * be different from the names of the tables? * * @return true if so; false otherwise * @exception SQLException - if a database access error occurs */ public boolean supportsDifferentTableCorrelationNames() throws SQLException { if (Driver.logDebug) Driver.debug("supportsDifferentTableCorrelationNames " + false); return false; } /* * Are expressions in "ORDER BY" lists supported? * * <br>e.g. select * from t order by a + b; * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsExpressionsInOrderBy() throws SQLException { if (Driver.logDebug) Driver.debug("supportsExpressionsInOrderBy " + true); return true; } /* * Can an "ORDER BY" clause use columns not in the SELECT? * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsOrderByUnrelated() throws SQLException { boolean supportsOrderByUnrelated = connection.haveMinimumServerVersion("6.4"); if (Driver.logDebug) Driver.debug("supportsOrderByUnrelated " + supportsOrderByUnrelated); return supportsOrderByUnrelated; } /* * Is some form of "GROUP BY" clause supported? * I checked it, and yes it is. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsGroupBy() throws SQLException { if (Driver.logDebug) Driver.debug("supportsGroupBy " + true); return true; } /* * Can a "GROUP BY" clause use columns not in the SELECT? * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsGroupByUnrelated() throws SQLException { boolean supportsGroupByUnrelated = connection.haveMinimumServerVersion("6.4"); if (Driver.logDebug) Driver.debug("supportsGroupByUnrelated " + supportsGroupByUnrelated); return supportsGroupByUnrelated; } /* * Can a "GROUP BY" clause add columns not in the SELECT provided * it specifies all the columns in the SELECT? Does anyone actually * understand what they mean here? * * (I think this is a subset of the previous function. -- petere) * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsGroupByBeyondSelect() throws SQLException { boolean supportsGroupByBeyondSelect = connection.haveMinimumServerVersion("6.4"); if (Driver.logDebug) Driver.debug("supportsGroupByUnrelated " + supportsGroupByBeyondSelect); return supportsGroupByBeyondSelect; } /* * Is the escape character in "LIKE" clauses supported? A * JDBC compliant driver always returns true. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsLikeEscapeClause() throws SQLException { boolean supportsLikeEscapeClause = connection.haveMinimumServerVersion("7.1"); if (Driver.logDebug) Driver.debug("supportsLikeEscapeClause " + supportsLikeEscapeClause); return supportsLikeEscapeClause; } /* * Are multiple ResultSets from a single execute supported? * Well, I implemented it, but I dont think this is possible from * the back ends point of view. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsMultipleResultSets() throws SQLException { if (Driver.logDebug) Driver.debug("supportsMultipleResultSets " + false); return false; } /* * Can we have multiple transactions open at once (on different * connections?) * I guess we can have, since Im relying on it. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsMultipleTransactions() throws SQLException { if (Driver.logDebug) Driver.debug("supportsMultipleTransactions " + true); return true; } /* * Can columns be defined as non-nullable. A JDBC Compliant driver * always returns true. * * <p>This changed from false to true in v6.2 of the driver, as this * support was added to the backend. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsNonNullableColumns() throws SQLException { if (Driver.logDebug) Driver.debug("supportsNonNullableColumns true"); return true; } /* * Does this driver support the minimum ODBC SQL grammar. This * grammar is defined at: * * <p><a href="http://www.microsoft.com/msdn/sdk/platforms/doc/odbc/src/intropr.htm">http://www.microsoft.com/msdn/sdk/platforms/doc/odbc/src/intropr.htm</a> * * <p>In Appendix C. From this description, we seem to support the * ODBC minimal (Level 0) grammar. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsMinimumSQLGrammar() throws SQLException { if (Driver.logDebug) Driver.debug("supportsMinimumSQLGrammar TRUE"); return true; } /* * Does this driver support the Core ODBC SQL grammar. We need * SQL-92 conformance for this. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsCoreSQLGrammar() throws SQLException { if (Driver.logDebug) Driver.debug("supportsCoreSQLGrammar FALSE "); return false; } /* * Does this driver support the Extended (Level 2) ODBC SQL * grammar. We don't conform to the Core (Level 1), so we can't * conform to the Extended SQL Grammar. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsExtendedSQLGrammar() throws SQLException { if (Driver.logDebug) Driver.debug("supportsExtendedSQLGrammar FALSE"); return false; } /* * Does this driver support the ANSI-92 entry level SQL grammar? * All JDBC Compliant drivers must return true. We currently * report false until 'schema' support is added. Then this * should be changed to return true, since we will be mostly * compliant (probably more compliant than many other databases) * And since this is a requirement for all JDBC drivers we * need to get to the point where we can return true. * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsANSI92EntryLevelSQL() throws SQLException { boolean schemas = connection.haveMinimumServerVersion("7.3"); if (Driver.logDebug) Driver.debug("supportsANSI92EntryLevelSQL " + schemas); return schemas; } /* * Does this driver support the ANSI-92 intermediate level SQL * grammar? * * @return true if so * @exception SQLException if a database access error occurs */ public boolean supportsANSI92IntermediateSQL() throws SQLException { if (Driver.logDebug) Driver.debug("supportsANSI92IntermediateSQL false "); return false;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?