SimpleSQLiteQuery
public final class SimpleSQLiteQuery 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(@NonNull String query)Creates an SQL query without any bind arguments. |
SimpleSQLiteQuery(@NonNull String query, Object[] bindArgs)Creates an SQL query with the sql string and the bind arguments. |
Public methods |
|
|---|---|
static final void |
bind(@NonNull SupportSQLiteProgram statement, Object[] bindArgs)Binds the given arguments into the given sqlite statement. |
void |
bindTo(@NonNull SupportSQLiteProgram statement)Creates an SQL query without any bind arguments. |
int |
Is the number of arguments in this query. |
@NonNull String |
getSql()The SQL query. |
Public constructors
SimpleSQLiteQuery
public SimpleSQLiteQuery(@NonNull String query)
Creates an SQL query without any bind arguments.
SimpleSQLiteQuery
public SimpleSQLiteQuery(@NonNull String query, Object[] bindArgs)
Creates an SQL query with the sql string and the bind arguments.
Public methods
bind
public static final void bind(@NonNull SupportSQLiteProgram statement, Object[] bindArgs)
Binds the given arguments into the given sqlite statement.
| Parameters | |
|---|---|
@NonNull SupportSQLiteProgram statement |
The sqlite statement |
Object[] bindArgs |
The list of bind arguments |
bindTo
public void bindTo(@NonNull SupportSQLiteProgram statement)
Creates an SQL query without any bind arguments.
| Parameters | |
|---|---|
@NonNull SupportSQLiteProgram statement |
The SQL query to execute. Cannot include bind parameters. |
getArgCount
public int getArgCount()
Is 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.