summaryrefslogtreecommitdiffstats
path: root/core/java/android/database
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-11-17 16:47:59 -0800
committerJean-Baptiste Queru <jbq@google.com>2010-11-17 16:47:59 -0800
commitf4072fcc14ec44072d31d7beeb4524550bead531 (patch)
treee1c9f0667191b0e6098079a9f264b29a32d3f0c2 /core/java/android/database
parentd28dc3cf7738f5574ef6359a67d68820dc6c2ad4 (diff)
parent8fc378f9f59c31f4d69878277696c6a6f723af53 (diff)
downloadframeworks_base-f4072fcc14ec44072d31d7beeb4524550bead531.zip
frameworks_base-f4072fcc14ec44072d31d7beeb4524550bead531.tar.gz
frameworks_base-f4072fcc14ec44072d31d7beeb4524550bead531.tar.bz2
resolved conflicts for merge of 8fc378f9 to gingerbread-plus-aosp
Change-Id: I938c0a66ad4271b33626d6b12406a2f6c6d1b6d8
Diffstat (limited to 'core/java/android/database')
-rw-r--r--core/java/android/database/sqlite/SQLiteQueryBuilder.java54
1 files changed, 41 insertions, 13 deletions
diff --git a/core/java/android/database/sqlite/SQLiteQueryBuilder.java b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
index 610bf70..b6aca2b 100644
--- a/core/java/android/database/sqlite/SQLiteQueryBuilder.java
+++ b/core/java/android/database/sqlite/SQLiteQueryBuilder.java
@@ -321,7 +321,7 @@ public class SQLiteQueryBuilder
}
String sql = buildQuery(
- projectionIn, selection, selectionArgs, groupBy, having,
+ projectionIn, selection, groupBy, having,
sortOrder, limit);
if (Log.isLoggable(TAG, Log.DEBUG)) {
@@ -345,10 +345,6 @@ public class SQLiteQueryBuilder
* formatted as an SQL WHERE clause (excluding the WHERE
* itself). Passing null will return all rows for the given
* URL.
- * @param selectionArgs You may include ?s in selection, which
- * will be replaced by the values from selectionArgs, in order
- * that they appear in the selection. The values will be bound
- * as Strings.
* @param groupBy A filter declaring how to group rows, formatted
* as an SQL GROUP BY clause (excluding the GROUP BY itself).
* Passing null will cause the rows to not be grouped.
@@ -365,8 +361,8 @@ public class SQLiteQueryBuilder
* @return the resulting SQL SELECT statement
*/
public String buildQuery(
- String[] projectionIn, String selection, String[] selectionArgs,
- String groupBy, String having, String sortOrder, String limit) {
+ String[] projectionIn, String selection, String groupBy,
+ String having, String sortOrder, String limit) {
String[] projection = computeProjection(projectionIn);
StringBuilder where = new StringBuilder();
@@ -394,6 +390,19 @@ public class SQLiteQueryBuilder
}
/**
+ * @deprecated This method's signature is misleading since no SQL parameter
+ * substitution is carried out. The selection arguments parameter does not get
+ * used at all. To avoid confusion, call
+ * {@link #buildQuery(String[], String, String, String, String, String)} instead.
+ */
+ @Deprecated
+ public String buildQuery(
+ String[] projectionIn, String selection, String[] selectionArgs,
+ String groupBy, String having, String sortOrder, String limit) {
+ return buildQuery(projectionIn, selection, groupBy, having, sortOrder, limit);
+ }
+
+ /**
* Construct a SELECT statement suitable for use in a group of
* SELECT statements that will be joined through UNION operators
* in buildUnionQuery.
@@ -422,10 +431,6 @@ public class SQLiteQueryBuilder
* formatted as an SQL WHERE clause (excluding the WHERE
* itself). Passing null will return all rows for the given
* URL.
- * @param selectionArgs You may include ?s in selection, which
- * will be replaced by the values from selectionArgs, in order
- * that they appear in the selection. The values will be bound
- * as Strings.
* @param groupBy A filter declaring how to group rows, formatted
* as an SQL GROUP BY clause (excluding the GROUP BY itself).
* Passing null will cause the rows to not be grouped.
@@ -443,7 +448,6 @@ public class SQLiteQueryBuilder
int computedColumnsOffset,
String typeDiscriminatorValue,
String selection,
- String[] selectionArgs,
String groupBy,
String having) {
int unionColumnsCount = unionColumns.length;
@@ -463,12 +467,36 @@ public class SQLiteQueryBuilder
}
}
return buildQuery(
- projectionIn, selection, selectionArgs, groupBy, having,
+ projectionIn, selection, groupBy, having,
null /* sortOrder */,
null /* limit */);
}
/**
+ * @deprecated This method's signature is misleading since no SQL parameter
+ * substitution is carried out. The selection arguments parameter does not get
+ * used at all. To avoid confusion, call
+ * {@link #buildUnionSubQuery}
+ * instead.
+ */
+ @Deprecated
+ public String buildUnionSubQuery(
+ String typeDiscriminatorColumn,
+ String[] unionColumns,
+ Set<String> columnsPresentInTable,
+ int computedColumnsOffset,
+ String typeDiscriminatorValue,
+ String selection,
+ String[] selectionArgs,
+ String groupBy,
+ String having) {
+ return buildUnionSubQuery(
+ typeDiscriminatorColumn, unionColumns, columnsPresentInTable,
+ computedColumnsOffset, typeDiscriminatorValue, selection,
+ groupBy, having);
+ }
+
+ /**
* Given a set of subqueries, all of which are SELECT statements,
* construct a query that returns the union of what those
* subqueries return.