Package SQLite.JDBC2z

Class JDBCResultSetMetaData

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getCatalogName​(int column)
      Returns the title of an indexed column's catalog.
      String getColumnClassName​(int column)
      Returns the fully-qualified type of the class that is produced when invoking ResultSet.getObject to recover this column's value.
      int getColumnCount()
      Returns number of columns contained in the associated result set.
      int getColumnDisplaySize​(int column)
      Returns the indexed column's standard maximum width, expressed in number of characters.
      String getColumnLabel​(int column)
      Returns a recommended title for the indexed column, to be used when the title needs to be displayed.
      String getColumnName​(int column)
      Returns the title of the indexed column.
      int getColumnType​(int column)
      Returns the type of the indexed column as SQL type code.
      String getColumnTypeName​(int column)
      Returns the type name of the indexed column.
      int getPrecision​(int column)
      Returns the decimal precision of the indexed column.
      int getScale​(int column)
      Returns the number of digits to the right of the decimal point of the indexed column.
      String getSchemaName​(int column)
      Returns the name of the indexed columns schema.
      String getTableName​(int column)
      Returns the title of the indexed columns table.
      boolean isAutoIncrement​(int column)
      Returns an indication of whether the indexed column is automatically incremented and is therefore read-only.
      boolean isCaseSensitive​(int column)
      Returns an indication of whether the case of the indexed column is important.
      boolean isCurrency​(int column)
      Returns whether the indexed column contains a monetary amount.
      boolean isDefinitelyWritable​(int column)
      Returns an indication of whether writing to the indexed column is guaranteed to be successful.
      int isNullable​(int column)
      Returns whether the indexed column is nullable.
      boolean isReadOnly​(int column)
      Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful.
      boolean isSearchable​(int column)
      Returns an indication of whether the indexed column is searchable.
      boolean isSigned​(int column)
      Returns an indication of whether the values contained in the indexed column are signed.
      boolean isWrapperFor​(Class iface)
      If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.
      boolean isWritable​(int column)
      Returns an indication of whether writing to the indexed column is possible.
      <T> T unwrap​(Class<T> iface)
      Returns an object that implements the given interface.
    • Constructor Detail

      • JDBCResultSetMetaData

        public JDBCResultSetMetaData​(JDBCResultSet r)
    • Method Detail

      • getColumnDisplaySize

        public int getColumnDisplaySize​(int column)
                                 throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns the indexed column's standard maximum width, expressed in number of characters.
        Specified by:
        getColumnDisplaySize in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        the column's max width.
        Throws:
        SQLException - if there is a database error.
      • getColumnLabel

        public String getColumnLabel​(int column)
                              throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns a recommended title for the indexed column, to be used when the title needs to be displayed.
        Specified by:
        getColumnLabel in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        the column's title.
        Throws:
        SQLException - if there is a database error.
      • getColumnType

        public int getColumnType​(int column)
                          throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns the type of the indexed column as SQL type code.
        Specified by:
        getColumnType in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        the column type code.
        Throws:
        SQLException - if there is a database error.
        See Also:
        Types
      • getPrecision

        public int getPrecision​(int column)
                         throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns the decimal precision of the indexed column.
        Specified by:
        getPrecision in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        the precision.
        Throws:
        SQLException - if there is a database error.
      • getScale

        public int getScale​(int column)
                     throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns the number of digits to the right of the decimal point of the indexed column.
        Specified by:
        getScale in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        number of decimal places.
        Throws:
        SQLException - if there is a database error.
      • getSchemaName

        public String getSchemaName​(int column)
                             throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns the name of the indexed columns schema.
        Specified by:
        getSchemaName in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        the name of the columns schema.
        Throws:
        SQLException - if there is a database error.
      • isAutoIncrement

        public boolean isAutoIncrement​(int column)
                                throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether the indexed column is automatically incremented and is therefore read-only.
        Specified by:
        isAutoIncrement in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if it is automatically numbered, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isCaseSensitive

        public boolean isCaseSensitive​(int column)
                                throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether the case of the indexed column is important.
        Specified by:
        isCaseSensitive in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if case matters, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isCurrency

        public boolean isCurrency​(int column)
                           throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns whether the indexed column contains a monetary amount.
        Specified by:
        isCurrency in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if it is a monetary value, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isDefinitelyWritable

        public boolean isDefinitelyWritable​(int column)
                                     throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether writing to the indexed column is guaranteed to be successful.
        Specified by:
        isDefinitelyWritable in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if the write is guaranteed, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isNullable

        public int isNullable​(int column)
                       throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns whether the indexed column is nullable.
        Specified by:
        isNullable in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if it is nullable, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isReadOnly

        public boolean isReadOnly​(int column)
                           throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether writing to the indexed column is guaranteed to be unsuccessful.
        Specified by:
        isReadOnly in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if the column is read-only, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isSearchable

        public boolean isSearchable​(int column)
                             throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether the indexed column is searchable.
        Specified by:
        isSearchable in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if the indexed column is searchable, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isSigned

        public boolean isSigned​(int column)
                         throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether the values contained in the indexed column are signed.
        Specified by:
        isSigned in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if they are signed, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • isWritable

        public boolean isWritable​(int column)
                           throws SQLException
        Description copied from interface: ResultSetMetaData
        Returns an indication of whether writing to the indexed column is possible.
        Specified by:
        isWritable in interface ResultSetMetaData
        Parameters:
        column - the column index, starting at 1.
        Returns:
        true if it is possible to write, false otherwise.
        Throws:
        SQLException - if there is a database error.
      • unwrap

        public <T> T unwrap​(Class<T> iface)
                     throws SQLException
        Description copied from interface: Wrapper
        Returns an object that implements the given interface. If the caller is not a wrapper, a SQLException will be thrown.
        Specified by:
        unwrap in interface Wrapper
        Parameters:
        iface - - the class that defines the interface
        Returns:
        - an object that implements the interface
        Throws:
        SQLException - - if there is no object implementing the specific interface
      • isWrapperFor

        public boolean isWrapperFor​(Class iface)
                             throws SQLException
        Description copied from interface: Wrapper
        If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.
        Specified by:
        isWrapperFor in interface Wrapper
        Parameters:
        iface - - the class that defines the interface
        Returns:
        - true if the instance implements the interface
        Throws:
        SQLException - - when an error occurs when judges the object