Class CoreStatement

  • All Implemented Interfaces:
    Codes
    Direct Known Subclasses:
    JDBC3Statement

    public abstract class CoreStatement
    extends java.lang.Object
    implements Codes
    • Field Detail

      • pointer

        public long pointer
      • sql

        protected java.lang.String sql
      • batchPos

        protected int batchPos
      • batch

        protected java.lang.Object[] batch
      • resultsWaiting

        protected boolean resultsWaiting
    • Method Detail

      • getDatbase

        public DB getDatbase()
      • checkOpen

        protected final void checkOpen()
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException - If the database is not opened.
      • exec

        protected boolean exec()
                        throws java.sql.SQLException
        Calls sqlite3_step() and sets up results. Expects a clean stmt.
        Returns:
        True if the ResultSet has at least one row; false otherwise.
        Throws:
        java.sql.SQLException - If the given SQL statement is null or no database is open.
      • exec

        protected boolean exec​(java.lang.String sql)
                        throws java.sql.SQLException
        Executes SQL statement and throws SQLExceptions if the given SQL statement is null or no database is open.
        Parameters:
        sql - SQL statement.
        Returns:
        True if the ResultSet has at least one row; false otherwise.
        Throws:
        java.sql.SQLException - If the given SQL statement is null or no database is open.
      • internalClose

        protected void internalClose()
                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • executeQuery

        public abstract java.sql.ResultSet executeQuery​(java.lang.String sql,
                                                        boolean closeStmt)
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException