📄 jdbcdatabasemetadata.java
字号:
* * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return false; // No: as case sensitive. } /** * Retrieves the string used to quote SQL identifiers. * This method returns a space " " if identifier quoting is not supported. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB uses the standard SQL identifer quote character * (the double qoute character); this method always returns <b>"</b>. * </span> * <!-- end release-specific documentation --> * * * @return the quoting string or a space if quoting is not supported * @exception SQLException if a database access error occurs */ public String getIdentifierQuoteString() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return "\""; // InterBase (iscdrv32.dll) returns "" }//fredt@users 20020429 - JavaDoc comment - in 1.7.1 there are keywords such// as TEMP, TEXT, CACHED that are not SQL 92 keywords /** * Retrieves a comma-separated list of all of this database's SQL keywords * that are NOT also SQL92 keywords. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * The list returned contains HSQLDB keywords that are not in the list * of reserved words. Some of these are in the list of potential reserved * words that are not SQL92 keywords, but are reported in the * standard as possible future SQL keywords. * </span> * <!-- end release-specific documentation --> * * * @return the list of this database's keywords that are not also * SQL92 keywords * @exception SQLException if a database access error occurs */ public String getSQLKeywords() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return "BEFORE,BIGINT,BINARY,CACHED,DATETIME," + "LIMIT,LONGVARBINARY,LONGVARCHAR,OBJECT,OTHER,SAVEPOINT," + "TEMP,TEXT,TRIGGER,TINYINT,VARBINARY,VARCHAR_IGNORECASE"; } /** * Retrieves a comma-separated list of math functions available with * this database. These are the Open /Open CLI math function names used in * the JDBC function escape clause. * @return the list of math functions supported by this database * @exception SQLException if a database access error occurs */ public String getNumericFunctions() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return StringUtil.getList(Library.sNumeric, ",", ""); } /** * Retrieves a comma-separated list of string functions available with * this database. These are the Open Group CLI string function names used * in the JDBC function escape clause. * @return the list of string functions supported by this database * @exception SQLException if a database access error occurs */ public String getStringFunctions() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return StringUtil.getList(Library.sString, ",", ""); } /** * Retrieves a comma-separated list of system functions available with * this database. These are the Open Group CLI system function names used * in the JDBC function escape clause. * @return a list of system functions supported by this database * @exception SQLException if a database access error occurs */ public String getSystemFunctions() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return StringUtil.getList(Library.sSystem, ",", ""); } /** * Retrieves a comma-separated list of the time and date functions available * with this database. * @return the list of time and date functions supported by this database * @exception SQLException if a database access error occurs */ public String getTimeDateFunctions() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return StringUtil.getList(Library.sTimeDate, ",", ""); } /** * Retrieves the string that can be used to escape wildcard characters. * This is the string that can be used to escape '_' or '%' in * the catalog search parameters that are a pattern (and therefore use one * of the wildcard characters). * * <P>The '_' character represents any single character; * the '%' character represents any sequence of zero or * more characters. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * Up to and including 1.7.1, HSQLDB uses the "\" character to escape * wildcard characters. * </span> * <!-- end release-specific documentation --> * * * @return the string used to escape wildcard characters * @exception SQLException if a database access error occurs */ public String getSearchStringEscape() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return "\\"; } /** * Retrieves all the "extra" characters that can be used in unquoted * identifier names (those beyond a-z, A-Z, 0-9 and _). <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * Up to and including 1.7.1, HSQLDB does not support using any * "extra" characters in unquoted identifier names; this method always * returns the empty String. * </span> * <!-- end release-specific documentation --> * * * @return the string containing the extra characters * @exception SQLException if a database access error occurs */ public String getExtraNameCharacters() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return ""; } //-------------------------------------------------------------------- // Functions describing which features are supported. /** * Retrieves whether this database supports <code>ALTER TABLE</code> * with add column. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * From 1.7.0, HSQLDB support this type of * <code>ALTER TABLE</code> statement; this method always * returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithAddColumn() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; } /** * Retrieves whether this database supports <code>ALTER TABLE</code> * with drop column. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * From 1.7.0, HSQLDB support this type of * <code>ALTER TABLE</code> statement; this method always * returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean supportsAlterTableWithDropColumn() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; } /** * Retrieves whether this database supports column aliasing. * * <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. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB supports column aliasing; this method always * returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean supportsColumnAliasing() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; // InterBase (iscdrv32.dll) returns false } /** * Retrieves whether this database supports concatenations between * <code>NULL</code> and non-<code>NULL</code> values being * <code>NULL</code>. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB supports this; this method always * returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean nullPlusNonNullIsNull() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; // Access (odbcjt32.dll) returns false } /** * Retrieves whether this database supports the <code>CONVERT</code> * function between SQL types. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB supports conversions; this method always * returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs */ public boolean supportsConvert() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; }// fredt@users - JD comment - I think this is unsupported at the moment// because SQL92 says conversion is implementation dependent, so if// conversion from DOUBLE to INTEGER were possbible we would return the// whole number part, but we currently throw. I'm not so sure about// conversions between string and numeric where it is logically possible// only if the string represents a numeric value /** * Retrieves whether this database supports the <code>CONVERT</code> * for two given SQL types. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB supports conversion though String intermediates, so everything * should be possible, short of number format errors (all Java objects * have a toString method); this method always returns <code>true</code>. * </span> * <!-- end release-specific documentation --> * * * @param fromType the type to convert from; one of the type codes from * the class <code>java.sql.Types</code> * @param toType the type to convert to; one of the type codes from * the class <code>java.sql.Types</code> * @return <code>true</code> if so; <code>false</code> otherwise * @exception SQLException if a database access error occurs * @see java.sql.Types */ public boolean supportsConvert(int fromType, int toType) throws SQLException { if (Trace.TRACE) { Trace.trace(); } return true; } /** * Retrieves whether this database supports table correlation names. <p> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -