belongs to Maven artifact android.arch.persistence:db:1.1.0-beta2
SimpleSQLiteQuery
public
final
class
SimpleSQLiteQuery
extends Object
implements
SupportSQLiteQuery
A basic implementation of SupportSQLiteQuery which receives a query and its args and
binds args based on the passed in Object type.
Summary
Public constructors | |
|---|---|
SimpleSQLiteQuery(String query, Object[] bindArgs)
Creates an SQL query with the sql string and the bind arguments. |
|
SimpleSQLiteQuery(String query)
Creates an SQL query without any bind arguments. |
|
Public methods | |
|---|---|
static
void
|
bind(SupportSQLiteProgram statement, Object[] bindArgs)
Binds the given arguments into the given sqlite statement. |
void
|
bindTo(SupportSQLiteProgram statement)
Callback to bind the query parameters to the compiled statement. |
int
|
getArgCount()
Returns the number of arguments in this query. |
String
|
getSql()
The SQL query. |
Inherited methods | |
|---|---|
|
From class
java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
final
Class<?>
getClass()
int
hashCode()
final
void
notify()
final
void
notifyAll()
String
toString()
final
void
wait(long arg0, int arg1)
final
void
wait(long arg0)
final
void
wait()
| |
|
From interface
android.arch.persistence.db.SupportSQLiteQuery
abstract
void
bindTo(SupportSQLiteProgram statement)
Callback to bind the query parameters to the compiled statement. | |
Public constructors
SimpleSQLiteQuery
SimpleSQLiteQuery (String query, Object[] bindArgs)
Creates an SQL query with the sql string and the bind arguments.
| Parameters | |
|---|---|
query |
String: The query string, can include bind arguments (.e.g ?). |
bindArgs |
Object: The bind argument value that will replace the placeholders in the query.
|
SimpleSQLiteQuery
SimpleSQLiteQuery (String query)
Creates an SQL query without any bind arguments.
| Parameters | |
|---|---|
query |
String: The SQL query to execute. Cannot include bind parameters.
|
Public methods
bind
void bind (SupportSQLiteProgram statement, Object[] bindArgs)
Binds the given arguments into the given sqlite statement.
| Parameters | |
|---|---|
statement |
SupportSQLiteProgram: The sqlite statement |
bindArgs |
Object: The list of bind arguments
|
bindTo
void bindTo (SupportSQLiteProgram statement)
Callback to bind the query parameters to the compiled statement.
| Parameters | |
|---|---|
statement |
SupportSQLiteProgram: The compiled statement
|
getArgCount
int getArgCount ()
Returns the number of arguments in this query. This is equal to the number of placeholders in the query string. See: https://www.sqlite.org/c3ref/bind_blob.html for details.
| Returns | |
|---|---|
int |
The number of arguments in the query. |
getSql
String getSql ()
The SQL query. This query can have placeholders(?) for bind arguments.
| Returns | |
|---|---|
String |
The SQL query to compile |
Interfaces
Classes