Class CoreResultSet

  • All Implemented Interfaces:
    Codes
    Direct Known Subclasses:
    JDBC3ResultSet

    public abstract class CoreResultSet
    extends Object
    implements Codes
    Implements a JDBC ResultSet.
    • Field Detail

      • emptyResultSet

        public boolean emptyResultSet
        If the result set does not have any rows.
      • open

        public boolean open
        If the result set is open. Doesn't mean it has results.
      • maxRows

        public long maxRows
        Maximum number of rows as set by a Statement
      • cols

        public String[] cols
        if null, the RS is closed()
      • colsMeta

        public String[] colsMeta
        same as cols, but used by Meta interface
      • meta

        protected boolean[][] meta
      • limitRows

        protected int limitRows
        0 means no limit, must check against maxRows
      • row

        protected int row
        number of current row, starts at 1 (0 is for before loading data)
      • pastLastRow

        protected boolean pastLastRow
      • lastCol

        protected int lastCol
        last column accessed, for wasNull(). -1 if none
      • closeStmt

        public boolean closeStmt
    • Constructor Detail

      • CoreResultSet

        protected CoreResultSet​(CoreStatement stmt)
        Default constructor for a given statement.
        Parameters:
        stmt - The statement.
    • Method Detail

      • getDatabase

        protected DB getDatabase()
      • isOpen

        public boolean isOpen()
        Checks the status of the result set.
        Returns:
        True if has results and can iterate them; false otherwise.
      • checkCol

        public int checkCol​(int col)
                     throws SQLException
        Takes col in [1,x] form, returns in [0,x-1] form
        Parameters:
        col -
        Returns:
        Throws:
        SQLException
      • markCol

        protected int markCol​(int col)
                       throws SQLException
        Takes col in [1,x] form, marks it as last accessed and returns [0,x-1]
        Parameters:
        col -
        Returns:
        Throws:
        SQLException
      • findColumnIndexInCache

        protected Integer findColumnIndexInCache​(String col)
      • addColumnIndexInCache

        protected int addColumnIndexInCache​(String col,
                                            int index)