Search in sources :

Example 6 with DeleteQuery

use of com.pushtorefresh.storio.contentresolver.queries.DeleteQuery in project storio by pushtorefresh.

the class DeleteOperationDesignTest method deleteByQueryObservable.

@Test
public void deleteByQueryObservable() {
    final DeleteQuery deleteQuery = DeleteQuery.builder().uri(mock(Uri.class)).where("some_field = ?").whereArgs("someValue").build();
    Observable<DeleteResult> deleteResultObservable = storIOContentResolver().delete().byQuery(deleteQuery).prepare().asRxObservable();
}
Also used : DeleteQuery(com.pushtorefresh.storio.contentresolver.queries.DeleteQuery) DeleteResult(com.pushtorefresh.storio.contentresolver.operations.delete.DeleteResult) Test(org.junit.Test)

Aggregations

DeleteQuery (com.pushtorefresh.storio.contentresolver.queries.DeleteQuery)6 Test (org.junit.Test)5 DeleteResult (com.pushtorefresh.storio.contentresolver.operations.delete.DeleteResult)3 NonNull (android.support.annotation.NonNull)2 Uri (android.net.Uri)1 StorIOContentResolver (com.pushtorefresh.storio.contentresolver.StorIOContentResolver)1 Completable (rx.Completable)1