| java.lang.Object | |||
| ↳ | com.tencent.wcdb.database.SQLiteClosable | ||
| ↳ | com.tencent.wcdb.database.SQLiteProgram | ||
| ↳ | com.tencent.wcdb.database.SQLiteStatement | ||
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.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
execute(CancellationSignal cancellationSignal)
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example
CREATE / DROP table, view, trigger, index etc.
| ||||||||||
| void |
execute()
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example
CREATE / DROP table, view, trigger, index etc.
| ||||||||||
| long |
executeInsert()
Execute this SQL statement and return the ID of the row inserted due to this call.
| ||||||||||
| long |
executeInsert(CancellationSignal cancellationSignal)
Execute this SQL statement and return the ID of the row inserted due to this call.
| ||||||||||
| int |
executeUpdateDelete(CancellationSignal cancellationSignal)
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.
| ||||||||||
| 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.
| ||||||||||
| long |
simpleQueryForLong()
Execute a statement that returns a 1 by 1 table with a numeric value.
| ||||||||||
| long |
simpleQueryForLong(CancellationSignal cancellationSignal)
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.
| ||||||||||
| String |
simpleQueryForString(CancellationSignal cancellationSignal)
Execute a statement that returns a 1 by 1 table with a text value.
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.tencent.wcdb.database.SQLiteProgram
| |||||||||||
From class
com.tencent.wcdb.database.SQLiteClosable
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.lang.AutoCloseable
| |||||||||||
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example CREATE / DROP table, view, trigger, index etc.
| cancellationSignal | A signal to cancel the operation in progress, or null if none.
If the operation is canceled, then OperationCanceledException will be thrown
when the query is executed. |
|---|
| SQLException | If the SQL string is invalid for some reason |
|---|
Execute this SQL statement, if it is not a SELECT / INSERT / DELETE / UPDATE, for example CREATE / DROP table, view, trigger, index etc.
| SQLException | If the SQL string is invalid for some reason |
|---|
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.
| SQLException | If the SQL string is invalid for some reason |
|---|
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.
| cancellationSignal | A signal to cancel the operation in progress, or null if none.
If the operation is canceled, then OperationCanceledException will be thrown
when the query is executed. |
|---|
| SQLException | If the SQL string is invalid for some reason |
|---|
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.
| cancellationSignal | A signal to cancel the operation in progress, or null if none.
If the operation is canceled, then OperationCanceledException will be thrown
when the query is executed. |
|---|
| SQLException | If the SQL string is invalid for some reason |
|---|
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.
| SQLException | If the SQL string is invalid for some reason |
|---|
Execute a statement that returns a 1 by 1 table with a numeric value. For example, SELECT COUNT(*) FROM table;
| SQLiteDoneException | if the query returns zero rows |
|---|
Execute a statement that returns a 1 by 1 table with a numeric value. For example, SELECT COUNT(*) FROM table;
| cancellationSignal | A signal to cancel the operation in progress, or null if none.
If the operation is canceled, then OperationCanceledException will be thrown
when the query is executed. |
|---|
| SQLiteDoneException | if the query returns zero rows |
|---|
Execute a statement that returns a 1 by 1 table with a text value. For example, SELECT COUNT(*) FROM table;
| SQLiteDoneException | if the query returns zero rows |
|---|
Execute a statement that returns a 1 by 1 table with a text value. For example, SELECT COUNT(*) FROM table;
| cancellationSignal | A signal to cancel the operation in progress, or null if none.
If the operation is canceled, then OperationCanceledException will be thrown
when the query is executed. |
|---|
| SQLiteDoneException | if the query returns zero rows |
|---|