Android SQLiteQueryBuilder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SQLiteQueryBuilder class.

This code example shows how to use the following methods:appendWhere, query, setTables
8
CodeRank
This code example shows how to use the following methods:appendWhere, query, setTables
8
CodeRank
This code example shows how to use the following methods:query, setTables
  } 
 
  @Override 
  public Cursor query(Uri url, String[] projection, String selection,
                      String[] selectionArgs, String sort) {
    SQLiteQueryBuilder qb=new SQLiteQueryBuilder();
 
    qb.setTables(TABLE);
 
    String orderBy;
 
    if (TextUtils.isEmpty(sort)) {
      orderBy=Constants.DEFAULT_SORT_ORDER;
    } 
    else { 
      orderBy=sort;
    } 
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,

8
CodeRank
This code example shows how to use the following methods:appendWhere, query, setTables
 
	@Override 
	public Cursor query(Uri url, String[] projectionIn, String selection,
			String[] selectionArgs, String sortOrder) {
 
		SQLiteQueryBuilder qBuilder = new SQLiteQueryBuilder();
		int match = URI_MATCHER.match(url);
		String groupBy = null;
 
		switch (match) {
 
		case GROUPS:
			qBuilder.setTables(TABLE_ROSTER + " " + QUERY_ALIAS);
			groupBy = RosterConstants.GROUP;
			break; 
 
		case GROUP_MEMBERS:
			qBuilder.setTables(TABLE_ROSTER + " " + QUERY_ALIAS);
			qBuilder.appendWhere(RosterConstants.GROUP + "=");
			qBuilder.appendWhere(url.getPathSegments().get(1));

8
CodeRank
This code example shows how to use the following methods:appendWhere, query, setProjectionMap, setTables
8
CodeRank
This code example shows how to use the following methods:appendWhere, query, setTables
8
CodeRank
This code example shows how to use the following methods:appendWhere, query, setTables
This code example shows how to use the following methods:appendWhere, query, setTables
    } 
 
    @Override 
    public Cursor query(Uri url, String[] projectionIn, String selection,
            String[] selectionArgs, String sort) {
        SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
 
        // Generate the body of the query 
        int match = sURLMatcher.match(url);
        switch (match) {
            case CITIES:
                qb.setTables("cities");
                break; 
            case CITIES_ID:
                qb.setTables("cities");
                qb.appendWhere("_id=");
                qb.appendWhere(url.getPathSegments().get(1));
                break; 
            default: 
                throw new IllegalArgumentException("Unknown URL " + url);

8
CodeRank
This code example shows how to use the following methods:query, setTables
	} 
 
	public Cursor getEmployees() {
 
		SQLiteDatabase db = getReadableDatabase();
		SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
 
		String [] sqlSelect = {"0 _id", "FullName"}; 
		String sqlTables = "Employees";
 
		qb.setTables(sqlTables);
		Cursor c = qb.query(db, sqlSelect, null, null,
				null, null, null); 
 
		c.moveToFirst();
		return c;
 
	} 
 
} 
8
CodeRank
This code example shows how to use the following methods:query, setTables
  } 
 
  @Override 
  public Cursor query(Uri url, String[] projection, String selection,
                      String[] selectionArgs, String sort) {
    SQLiteQueryBuilder qb=new SQLiteQueryBuilder();
 
    qb.setTables(TABLE);
 
    String orderBy;
 
    if (TextUtils.isEmpty(sort)) {
      orderBy=Constants.DEFAULT_SORT_ORDER;
    } 
    else { 
      orderBy=sort;
    } 
 
    Cursor c=
        qb.query(db.getReadableDatabase(), projection, selection,

8
CodeRank

Related Android SQLiteQueryBuilder Questions & Answers:

See Code Examples for Android SQLiteQueryBuilder Methods: