IT. Expert System.

Android Reference

SQLiteStatement


android.database.sqlite

Class SQLiteStatement

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public final class SQLiteStatement
    extends SQLiteProgram
    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 Detail

      • execute

        public void execute()
        Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example CREATE / DROP table, view, trigger, index etc.
        Throws:
        SQLException - If the SQL string is invalid for some reason
      • executeUpdateDelete

        public int executeUpdateDelete()
        Execute this SQL statement, if the the number of rows affected by execution of this SQL statement is of any importance to the caller - for example, UPDATE / DELETE SQL statements.
        Returns:
        the number of rows affected by this SQL statement execution.
        Throws:
        SQLException - If the SQL string is invalid for some reason
      • executeInsert

        public 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.
        Returns:
        the row ID of the last row inserted, if this insert is successful. -1 otherwise.
        Throws:
        SQLException - If the SQL string is invalid for some reason
      • simpleQueryForLong

        public long simpleQueryForLong()
        Execute a statement that returns a 1 by 1 table with a numeric value. For example, SELECT COUNT(*) FROM table;
        Returns:
        The result of the query.
        Throws:
        SQLiteDoneException - if the query returns zero rows
      • simpleQueryForString

        public String simpleQueryForString()
        Execute a statement that returns a 1 by 1 table with a text value. For example, SELECT COUNT(*) FROM table;
        Returns:
        The result of the query.
        Throws:
        SQLiteDoneException - if the query returns zero rows
      • simpleQueryForBlobFileDescriptor

        public ParcelFileDescriptor simpleQueryForBlobFileDescriptor()
        Executes a statement that returns a 1 by 1 table with a blob value.
        Returns:
        A read-only file descriptor for a copy of the blob value, or null if the value is null or could not be read for some reason.
        Throws:
        SQLiteDoneException - if the query returns zero rows
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 533 / . Delta: 0.02317 с