diff options
| -rw-r--r-- | api/current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteQueryBuilder.java | 42 |
2 files changed, 46 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index 2206971e40dc..c66400684e63 100644 --- a/api/current.txt +++ b/api/current.txt @@ -13064,6 +13064,10 @@ package android.database.sqlite { method public String buildUnionSubQuery(String, String[], java.util.Set<java.lang.String>, int, String, String, String, String); method @Deprecated public String buildUnionSubQuery(String, String[], java.util.Set<java.lang.String>, int, String, String, String[], String, String); method public int delete(@NonNull android.database.sqlite.SQLiteDatabase, @Nullable String, @Nullable String[]); + method public android.database.sqlite.SQLiteDatabase.CursorFactory getCursorFactory(); + method public boolean getDistinct(); + method public java.util.Map<java.lang.String,java.lang.String> getProjectionMap(); + method public boolean getStrict(); method public String getTables(); method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, String[], String, String[], String, String, String); method public android.database.Cursor query(android.database.sqlite.SQLiteDatabase, String[], String, String[], String, String, String, String); diff --git a/core/java/android/database/sqlite/SQLiteQueryBuilder.java b/core/java/android/database/sqlite/SQLiteQueryBuilder.java index 5722e7b25fbf..ea489c456f3d 100644 --- a/core/java/android/database/sqlite/SQLiteQueryBuilder.java +++ b/core/java/android/database/sqlite/SQLiteQueryBuilder.java @@ -77,6 +77,14 @@ public class SQLiteQueryBuilder { } /** + * Get if the query is marked as DISTINCT, as last configured by + * {@link #setDistinct(boolean)}. + */ + public boolean getDistinct() { + return mDistinct; + } + + /** * Returns the list of tables being queried * * @return the list of tables being queried @@ -167,6 +175,14 @@ public class SQLiteQueryBuilder { } /** + * Gets the projection map for the query, as last configured by + * {@link #setProjectionMap(Map)}. + */ + public Map<String, String> getProjectionMap() { + return mProjectionMap; + } + + /** * Sets a projection greylist of columns that will be allowed through, even * when {@link #setStrict(boolean)} is enabled. This provides a way for * abusive custom columns like {@code COUNT(*)} to continue working. @@ -178,6 +194,16 @@ public class SQLiteQueryBuilder { } /** + * Gets the projection greylist for the query, as last configured by + * {@link #setProjectionGreylist(List)}. + * + * @hide + */ + public List<Pattern> getProjectionGreylist() { + return mProjectionGreylist; + } + + /** * Sets the cursor factory to be used for the query. You can use * one factory for all queries on a database but it is normally * easier to specify the factory when doing this query. @@ -189,6 +215,14 @@ public class SQLiteQueryBuilder { } /** + * Sets the cursor factory to be used for the query, as last configured by + * {@link #setCursorFactory(android.database.sqlite.SQLiteDatabase.CursorFactory)}. + */ + public SQLiteDatabase.CursorFactory getCursorFactory() { + return mFactory; + } + + /** * When set, the selection is verified against malicious arguments. * When using this class to create a statement using * {@link #buildQueryString(boolean, String, String[], String, String, String, String, String)}, @@ -214,6 +248,14 @@ public class SQLiteQueryBuilder { } /** + * Get if the query is marked as strict, as last configured by + * {@link #setStrict(boolean)}. + */ + public boolean getStrict() { + return mStrict; + } + + /** * Build an SQL query string from the given clauses. * * @param distinct true if you want each row to be unique, false otherwise. |