Code example for SQLiteQuery

Methods: toString

0
        CursorFactory cursorFactory = new CursorFactory() {
 
            @Override 
            public Cursor newCursor(final SQLiteDatabase db, final SQLiteCursorDriver masterQuery, final String editTable,
                    final SQLiteQuery query) {
                Log.d(TAG, query.toString());
                return new SQLiteCursor(db, masterQuery, editTable, query);
            } 
        }; 
 
        return database.queryWithFactory(cursorFactory, false, model.getTableName(),
                columns.isEmpty() ? null : columns.toArray(new String[columns.size()]),
                "(" + joinList(selectionBuilder, ") and (") + ")",
                selectionArgs.isEmpty() ? null : selectionArgs.toArray(new String[selectionArgs.size()]),
                joinList(groupByBuilder, ", "), joinList(havingBuilder, ", "), joinList(orderBuilder, ", "), firstResult + ","
                        + maxResults);
    } 
 
    static String joinList(final List<String> strings, final String delimiter) {
        if (strings.isEmpty()) {
Stop searching for code, let great code find you!  Add Codota to your java IDE