Package 

Class SQLiteStatement

  • All Implemented Interfaces:
    androidx.sqlite.db.SupportSQLiteProgram , androidx.sqlite.db.SupportSQLiteStatement , java.io.Closeable , java.lang.AutoCloseable

    
    public final class SQLiteStatement
    extends SQLiteProgram implements SupportSQLiteStatement
                        

    Represents a statement that can be executed against a database. The statement cannot return multiple rows or columns, but single value (1 x 1) result sets are supported.

    This class is not thread-safe.

    • Method Summary

      Modifier and Type Method Description
      void executeRaw() Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for exampleCREATE / DROP table, view, trigger, index etc.
      void execute() Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for exampleCREATE / DROP table, view, trigger, index etc.
      int executeUpdateDelete() Execute this SQL statement, if the the number of rows affected by execution of this SQLstatement is of any importance to the caller - for example, UPDATE / DELETE SQL statements.
      long executeInsert() Execute this SQL statement and return the ID of the row inserted due to this call.The SQL statement should be an INSERT for this to be a useful call.
      long simpleQueryForLong() Execute a statement that returns a 1 by 1 table with a numeric value.
      String simpleQueryForString() Execute a statement that returns a 1 by 1 table with a text value.
      ParcelFileDescriptor simpleQueryForBlobFileDescriptor() Executes a statement that returns a 1 by 1 table with a blob value.
      String toString()
      • Methods inherited from class net.zetetic.database.sqlcipher.SQLiteProgram

        bindAllArgs, bindAllArgsAsStrings, bindBlob, bindDouble, bindLong, bindNull, bindString, clearBindings, getUniqueId
      • Methods inherited from class net.zetetic.database.sqlcipher.SQLiteClosable

        acquireReference, close, releaseReference, releaseReferenceFromContainer
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class androidx.sqlite.db.SupportSQLiteProgram

        bindBlob, bindDouble, bindLong, bindNull, bindString, clearBindings
      • Methods inherited from class androidx.sqlite.db.SupportSQLiteStatement

        execute, executeInsert, executeUpdateDelete, simpleQueryForLong, simpleQueryForString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • executeRaw

         void executeRaw()

        Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for exampleCREATE / DROP table, view, trigger, index etc.

      • execute

         void execute()

        Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for exampleCREATE / DROP table, view, trigger, index etc.

      • executeUpdateDelete

         int executeUpdateDelete()

        Execute this SQL statement, if the the number of rows affected by execution of this SQLstatement is of any importance to the caller - for example, UPDATE / DELETE SQL statements.

      • executeInsert

         long executeInsert()

        Execute this SQL statement and return the ID of the row inserted due to this call.The SQL statement should be an INSERT for this to be a useful call.

      • simpleQueryForLong

         long simpleQueryForLong()

        Execute a statement that returns a 1 by 1 table with a numeric value.For example, SELECT COUNT(*) FROM table;

      • simpleQueryForString

         String simpleQueryForString()

        Execute a statement that returns a 1 by 1 table with a text value.For example, SELECT COUNT(*) FROM table;