SupportSQLiteStatement
interface SupportSQLiteStatement : SupportSQLiteProgram
androidx.sqlite.db.SupportSQLiteStatement |
An interface to map the behavior of android.database.sqlite.SQLiteStatement
.
Summary
Public methods | |
---|---|
abstract Unit |
execute() Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example CREATE / DROP table, view, trigger, index etc. |
abstract Long |
Execute this SQL statement and return the ID of the row inserted due to this call. |
abstract Int |
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. |
abstract Long |
Execute a statement that returns a 1 by 1 table with a numeric value. |
abstract String! |
Execute a statement that returns a 1 by 1 table with a text value. |
Inherited functions | |
---|---|
Public methods
execute
abstract fun execute(): Unit
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example CREATE / DROP table, view, trigger, index etc.
Exceptions | |
---|---|
android.database.SQLException |
If the SQL string is invalid for some reason |
executeInsert
abstract fun executeInsert(): Long
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.
Return | |
---|---|
Long |
the row ID of the last row inserted, if this insert is successful. -1 otherwise. |
Exceptions | |
---|---|
android.database.SQLException |
If the SQL string is invalid for some reason |
executeUpdateDelete
abstract fun executeUpdateDelete(): Int
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.
Return | |
---|---|
Int |
the number of rows affected by this SQL statement execution. |
Exceptions | |
---|---|
android.database.SQLException |
If the SQL string is invalid for some reason |
simpleQueryForLong
abstract fun simpleQueryForLong(): Long
Execute a statement that returns a 1 by 1 table with a numeric value. For example, SELECT COUNT(*) FROM table;
Return | |
---|---|
Long |
The result of the query. |
Exceptions | |
---|---|
android.database.sqlite.SQLiteDoneException |
if the query returns zero rows |