⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tinysqldatabasemetadata.java

📁 TinySQL是一个轻量级的纯java数据库引擎
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
     * What's the maximum number of columns allowed in an index?
     *
     * @return max number of columns;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxColumnsInIndex() {
          return 0;
        }

    /**
     * What's the maximum number of columns in an "ORDER BY" clause?
     *
     * @return max number of columns;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxColumnsInOrderBy() {
          return 0;
        }

    /**
     * What's the maximum number of columns in a "SELECT" list?
     *
     * @return max number of columns;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxColumnsInSelect() {
          return 10000; // !!!
        }

    /**
     * What's the maximum number of columns in a table?
     *
     * @return max number of columns;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxColumnsInTable() {
          return 10000; // !!!
        }

    /**
     * How many active connections can we have at a time to this database?
     *
     * @return max number of active connections;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxConnections() {
          return 1; // !!!
        }

    /**
     * What's the maximum cursor name length?
     *
     * @return max cursor name length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxCursorNameLength() {
          return 0;
        }

    /**
     * What's the maximum length of an index (in bytes)?  
     *
     * @return max index length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxIndexLength() {
          return 0;
        }

    /**
     * What's the maximum length allowed for a schema name?
     *
     * @return max name length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxSchemaNameLength() {
          return 0;
        }

    /**
     * What's the maximum length of a procedure name?
     *
     * @return max name length in bytes; 
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxProcedureNameLength() {
          return 0;
        }

    /**
     * What's the maximum length of a catalog name?
     *
     * @return max name length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxCatalogNameLength() {
          return 0;
        }

    /**
     * What's the maximum length of a single row?
     *
     * @return max row size in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxRowSize() {
          return 0;
          // The maxRowSize() depends on each dBase file, so it can磘 be told here generally
          // return connection.getTinySqlHandle().getTableHandle("xy").getRecordLength();
        }

    /**
     * Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
     * blobs?
     *
     * @return <code>true</code> if so; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     */
        public boolean doesMaxRowSizeIncludeBlobs() {
          return false;
        }

    /**
     * What's the maximum length of a SQL statement?
     *
     * @return max length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxStatementLength() {
          return 0;
        }

    /**
     * How many active statements can we have open at one time to this
     * database?
     *
     * @return the maximum number of statements that can be open at one time;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxStatements() {
          return 10; // !!!
        }

    /**
     * What's the maximum length of a table name?
     *
     * @return max name length in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxTableNameLength() {
          return 32; // !!! filesystem name
        }

    /**
     * What's the maximum number of tables in a SELECT statement?
     *
     * @return the maximum number of tables allowed in a SELECT statement;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxTablesInSelect() {
          return 1; // !!!
        }

    /**
     * What's the maximum length of a user name?
     *
     * @return max user name length  in bytes;
         *      a result of zero means that there is no limit or the limit is not known
     * @exception SQLException if a database access error occurs
     */
        public int getMaxUserNameLength() {
          return 0;
        }

    //----------------------------------------------------------------------

    /**
     * What's the database's default transaction isolation level?  The
     * values are defined in <code>java.sql.Connection</code>.
     *
     * @return the default isolation level 
     * @exception SQLException if a database access error occurs
     * @see Connection
     */
        public int getDefaultTransactionIsolation() throws SQLException {
          throw new SQLException("tinySQL does not support transaction isolation.");
        }

    /**
     * Are transactions supported? If not, invoking the method
         * <code>commit</code> is a noop and the
     * isolation level is TRANSACTION_NONE.
     *
     * @return <code>true</code> if transactions are supported; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     */
        public boolean supportsTransactions() {
          return false;
        }

    /**
     * Does this database support the given transaction isolation level?
     *
     * @param level the values are defined in <code>java.sql.Connection</code>
     * @return <code>true</code> if so; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     * @see Connection
     */
        public boolean supportsTransactionIsolationLevel(int level) {
          return false;
        }

    /**
     * Are both data definition and data manipulation statements
     * within a transaction supported?
     *
     * @return <code>true</code> if so; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     */
        public boolean supportsDataDefinitionAndDataManipulationTransactions(){
          return false;
        }
    /**
     * Are only data manipulation statements within a transaction
     * supported?
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     * @exception SQLException if a database access error occurs
     */
        public boolean supportsDataManipulationTransactionsOnly(){
          return false;
        }
    /**
     * Does a data definition statement within a transaction force the
     * transaction to commit?
     *
     * @return <code>true</code> if so; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     */
        public boolean dataDefinitionCausesTransactionCommit(){
          return false;
        }
    /**
     * Is a data definition statement within a transaction ignored?
     *
     * @return <code>true</code> if so; <code>false</code> otherwise 
     * @exception SQLException if a database access error occurs
     */
        public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
          throw new SQLException("tinySQL does not support transactions.");
        }


    /**
     * Gets a description of the stored procedures available in a
     * catalog.
     *
     * <P>Only procedure descriptions matching the schema and
     * procedure name criteria are returned.  They are ordered by
     * PROCEDURE_SCHEM, and PROCEDURE_NAME.
     *
     * <P>Each procedure description has the the following columns:
     *  <OL>
     *  <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
     *  <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
     *  <LI><B>PROCEDURE_NAME</B> String => procedure name
     *  <LI> reserved for future use
     *  <LI> reserved for future use
     *  <LI> reserved for future use
     *  <LI><B>REMARKS</B> String => explanatory comment on the procedure
     *  <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
     *      <UL>
     *      <LI> procedureResultUnknown - May return a result
     *      <LI> procedureNoResult - Does not return a result
     *      <LI> procedureReturnsResult - Returns a result
     *      </UL>
     *  </OL>
     *
     * @param catalog a catalog name; "" retrieves those without a
     * catalog; null means drop catalog name from the selection criteria
     * @param schemaPattern a schema name pattern; "" retrieves those
     * without a schema
     * @param procedureNamePattern a procedure name pattern 
     * @return ResultSet - each row is a procedure description 
     * @exception SQLException if a database access error occurs
     * @see #getSearchStringEscape 
     */
        public ResultSet getProcedures(String catalog, String schemaPattern,
                        String procedureNamePattern) {
                          return null;
                        }

    /**
         * A possible value for column <code>PROCEDURE_TYPE</code> in the
         * <code>ResultSet</code> object returned by the method
         * <code>getProcedures</code>.
         * <p> Indicates that it is not known whether the procedure returns
         * a result.
     */
        int procedureResultUnknown  = 0;

    /**
         * A possible value for column <code>PROCEDURE_TYPE</code> in the
         * <code>ResultSet</code> object returned by the method
         * <code>getProcedures</code>.
         * <p> Indicates that the procedure does not return
         * a result.
     */
        int procedureNoResult   = 1;

    /**
         * A possible value for column <code>PROCEDURE_TYPE</code> in the
         * <code>ResultSet</code> object returned by the method
         * <code>getProcedures</code>.
         * <p> Indicates that the procedure returns
         * a result.
     */
        int procedureReturnsResult  = 2;

    /**
     * Gets a description of a catalog's stored procedure parameters
     * and result columns.
     *
     * <P>Only descriptions matching the schema, procedure and
     * parameter name criteria are returned.  They are ordered by
     * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
     * if any, is first. Next are the parameter descriptions in call
     * order. The column descriptions follow in column number order.
     *
     * <P>Each row in the ResultSet is a parameter description or
     * column description with the following fields:
     *  <OL>
     *  <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
     *  <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
     *  <LI><B>PROCEDURE_NAME</B> String => procedure name
     *  <LI><B>COLUMN_NAME</B> String => column/parameter name 
     *  <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
     *      <UL>
     *      <LI> procedureColumnUnknown - nobody knows
     *      <LI> procedureColumnIn - IN parameter
     *      <LI> procedureColumnInOut - INOUT parameter
     *      <LI> procedureColumnOut - OUT parameter
     *      <LI> procedureColumnReturn - procedure return value
     *      <LI> procedureColumnResult - result column in ResultSet
     *      </UL>
     *  <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
     *  <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
     *  type name is fully qualified
     *  <LI><B>PRECISION</B> int => precision
     *  <LI><B>LENGTH</B> int => length in bytes of data
     *  <LI><B>SCALE</B> short => scale
     *  <LI><B>RADIX</B> short => radix
     *  <LI><B>NULLABLE</B> short => can it contain NULL?
     *      <UL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -