3

Sorry if this question have been asked before . Why SqlQueryBuilder class is used in ContentProvider

1) For what purpose SqlQueryBuilder class is used for ?

2) what this method does?

 qb.setTables(STUDENTS_TABLE_NAME);
 qb.setProjectionMap(STUDENTS_PROJECTION_MAP);
 qb.appendWhere( _ID + "=" + uri.getPathSegments().get(1));

3) I noticed in content resolver that to call content provider query().managedQuery() is used . Why this method is used?

Sathish Kumar J
  • 4,280
  • 1
  • 20
  • 48
FaisalAhmed
  • 3,469
  • 7
  • 46
  • 76

1 Answers1

0

SQLiteQueryBuilder is a convience class that helps build SQL queries. Try this documentation for APIs usage:

https://developer.android.com/reference/android/database/sqlite/SQLiteQueryBuilder.html
user3765370
  • 130
  • 6
  • 1
    managedQuery is deprecated from API 11 onwards. Refer this if you looking for alternative: http://stackoverflow.com/questions/12714701/deprecated-managedquery-issue – user3765370 Jul 15 '16 at 07:07