Example usage for android.database.sqlite SQLiteQueryBuilder setDistinct

List of usage examples for android.database.sqlite SQLiteQueryBuilder setDistinct

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteQueryBuilder setDistinct.

Prototype

public void setDistinct(boolean distinct) 

Source Link

Document

Mark the query as DISTINCT.

Usage

From source file:com.hyunnyapp.easycursor.sqlcursor.querymodels.SelectQueryModel.java

@Override
protected Cursor executeQueryInternal(final SQLiteDatabase db) {
    final SQLiteQueryBuilder builder = new SQLiteQueryBuilder();
    builder.setTables(getTables());/*w w  w.  j  ava 2s  .  c o  m*/
    builder.setDistinct(isDistinct());

    if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        builder.setStrict(isStrict());
    }

    return builder.query(db, getProjectionIn(), getSelection(), getSelectionArgs(), getGroupBy(), getHaving(),
            getSortOrder(), getLimit());
}