@@ -321,7 +321,7 @@ public Cursor query(SQLiteDatabase db, String[] projectionIn,
321321 }
322322
323323 String sql = buildQuery (
324- projectionIn , selection , selectionArgs , groupBy , having ,
324+ projectionIn , selection , groupBy , having ,
325325 sortOrder , limit );
326326
327327 if (Log .isLoggable (TAG , Log .DEBUG )) {
@@ -345,10 +345,6 @@ public Cursor query(SQLiteDatabase db, String[] projectionIn,
345345 * formatted as an SQL WHERE clause (excluding the WHERE
346346 * itself). Passing null will return all rows for the given
347347 * URL.
348- * @param selectionArgs You may include ?s in selection, which
349- * will be replaced by the values from selectionArgs, in order
350- * that they appear in the selection. The values will be bound
351- * as Strings.
352348 * @param groupBy A filter declaring how to group rows, formatted
353349 * as an SQL GROUP BY clause (excluding the GROUP BY itself).
354350 * Passing null will cause the rows to not be grouped.
@@ -365,8 +361,8 @@ public Cursor query(SQLiteDatabase db, String[] projectionIn,
365361 * @return the resulting SQL SELECT statement
366362 */
367363 public String buildQuery (
368- String [] projectionIn , String selection , String [] selectionArgs ,
369- String groupBy , String having , String sortOrder , String limit ) {
364+ String [] projectionIn , String selection , String groupBy ,
365+ String having , String sortOrder , String limit ) {
370366 String [] projection = computeProjection (projectionIn );
371367
372368 StringBuilder where = new StringBuilder ();
@@ -393,6 +389,19 @@ public String buildQuery(
393389 groupBy , having , sortOrder , limit );
394390 }
395391
392+ /**
393+ * @deprecated This method's signature is misleading since no SQL parameter
394+ * substitution is carried out. The selection arguments parameter does not get
395+ * used at all. To avoid confusion, call
396+ * {@link #buildQuery(String[], String, String, String, String, String)} instead.
397+ */
398+ @ Deprecated
399+ public String buildQuery (
400+ String [] projectionIn , String selection , String [] selectionArgs ,
401+ String groupBy , String having , String sortOrder , String limit ) {
402+ return buildQuery (projectionIn , selection , groupBy , having , sortOrder , limit );
403+ }
404+
396405 /**
397406 * Construct a SELECT statement suitable for use in a group of
398407 * SELECT statements that will be joined through UNION operators
@@ -422,10 +431,6 @@ public String buildQuery(
422431 * formatted as an SQL WHERE clause (excluding the WHERE
423432 * itself). Passing null will return all rows for the given
424433 * URL.
425- * @param selectionArgs You may include ?s in selection, which
426- * will be replaced by the values from selectionArgs, in order
427- * that they appear in the selection. The values will be bound
428- * as Strings.
429434 * @param groupBy A filter declaring how to group rows, formatted
430435 * as an SQL GROUP BY clause (excluding the GROUP BY itself).
431436 * Passing null will cause the rows to not be grouped.
@@ -443,7 +448,6 @@ public String buildUnionSubQuery(
443448 int computedColumnsOffset ,
444449 String typeDiscriminatorValue ,
445450 String selection ,
446- String [] selectionArgs ,
447451 String groupBy ,
448452 String having ) {
449453 int unionColumnsCount = unionColumns .length ;
@@ -463,11 +467,35 @@ public String buildUnionSubQuery(
463467 }
464468 }
465469 return buildQuery (
466- projectionIn , selection , selectionArgs , groupBy , having ,
470+ projectionIn , selection , groupBy , having ,
467471 null /* sortOrder */ ,
468472 null /* limit */ );
469473 }
470474
475+ /**
476+ * @deprecated This method's signature is misleading since no SQL parameter
477+ * substitution is carried out. The selection arguments parameter does not get
478+ * used at all. To avoid confusion, call
479+ * {@link #buildUnionSubQuery(String, String[], Set<String>, int, String, String, String, String)}
480+ * instead.
481+ */
482+ @ Deprecated
483+ public String buildUnionSubQuery (
484+ String typeDiscriminatorColumn ,
485+ String [] unionColumns ,
486+ Set <String > columnsPresentInTable ,
487+ int computedColumnsOffset ,
488+ String typeDiscriminatorValue ,
489+ String selection ,
490+ String [] selectionArgs ,
491+ String groupBy ,
492+ String having ) {
493+ return buildUnionSubQuery (
494+ typeDiscriminatorColumn , unionColumns , columnsPresentInTable ,
495+ computedColumnsOffset , typeDiscriminatorValue , selection ,
496+ groupBy , having );
497+ }
498+
471499 /**
472500 * Given a set of subqueries, all of which are SELECT statements,
473501 * construct a query that returns the union of what those
0 commit comments