English | Site Directory

Android - An Open Handset Alliance Project

android.database.sqlite
public abstract class

android.database.sqlite.SQLiteProgram

java.lang.Object
android.database.sqlite.SQLiteProgram SQLiteClosable

A base class for compiled SQLite programs.

Known Direct Subclasses

Summary

Fields

protected      SQLiteDatabase  mDatabase  The database this program is compiled against. 
protected      int  nHandle  Native linkage, do not modify  
protected      int  nStatement  Native linkage, do not modify  

Public Methods

        void  bindDouble(int index, double value)
Bind a double value to this statement.
        void  bindLong(int index, long value)
Bind a long value to this statement.
        void  bindNull(int index)
Bind a NULL value to this statement.
        void  bindString(int index, String value)
Bind a String value to this statement.
        void  clearBindings()
Clears all existing bindings.
        void  close()
Release this program's resources, making it invalid.
    final    int  getUniqueId()
Returns a unique identifier for this program.

Protected Methods

        void  compile(String sql)
        void  finalize()
Make sure that the native resource is cleaned up.
    final    void  native_compile(String sql)
Compiles SQL into a SQLite program.
Methods inherited from class java.lang.Object
Methods inherited from interface android.database.sqlite.SQLiteClosable

Details

Fields

protected SQLiteDatabase mDatabase

The database this program is compiled against.

protected int nHandle

Native linkage, do not modify

protected int nStatement

Native linkage, do not modify

Public Methods

public void bindDouble(int index, double value)

Bind a double value to this statement. The value remains bound until clearBindings() is called.

Parameters

index The 1-based index to the parameter to bind
value The value to bind

public void bindLong(int index, long value)

Bind a long value to this statement. The value remains bound until clearBindings() is called.

Parameters

index The 1-based index to the parameter to bind
value The value to bind

public void bindNull(int index)

Bind a NULL value to this statement. The value remains bound until clearBindings() is called.

Parameters

index The 1-based index to the parameter to bind null to

public void bindString(int index, String value)

Bind a String value to this statement. The value remains bound until clearBindings() is called.

Parameters

index The 1-based index to the parameter to bind
value The value to bind

public void clearBindings()

Clears all existing bindings. Unset bindings are treated as NULL.

public void close()

Release this program's resources, making it invalid.

public final int getUniqueId()

Returns a unique identifier for this program.

Returns

  • a unique identifier for this program

Protected Methods

protected void compile(String sql)

protected void finalize()

Make sure that the native resource is cleaned up.

protected final void native_compile(String sql)

Compiles SQL into a SQLite program.

The database lock must be helf when calling this method.

Parameters

sql The SQL to compile.
Build m5-rc15i - 10 Jun 2008 13:54