droitatedDB/src/main/java/org/droitateddb/DbCreator.java
public Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) {
		SQLiteDatabase db = getDatabaseConnection();
		return new DbClosingCursor(db.query(table, columns, selection, selectionArgs, groupBy, having, orderBy), this);
	}
public Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) {
		SQLiteDatabase db = getDatabaseConnection();
		return new DbClosingCursor(db.query(table, columns, selection, selectionArgs, groupBy, having, orderBy), this);
	}
Executes a query on the database. Note that when calling close on the returned cursor the database connection count is reduces as well.

@param table         Name of the table
@param columns       Used columns of the queried table
@param selection     Selection statement
@param selectionArgs Selection arguments
@param groupBy       SQL group by
@param having        SQL having
@param orderBy       SQL order by
@return A Cursor containing the result, which reduces the database connection count when closed