public abstract class StorIOSQLite
extends java.lang.Object
implements java.io.Closeable
SQLiteDatabase.
It's an abstract class instead of interface because we want to have ability to add some
changes without breaking existing implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
StorIOSQLite.Internal
Deprecated.
please use
StorIOSQLite.LowLevel instead, this type will be removed in v2.0,
basically we're just giving this API a better name. |
static class |
StorIOSQLite.LowLevel
API for low level operations with
StorIOSQLite, we made it separate
to make StorIOSQLite API clean and easy to understand. |
| Constructor and Description |
|---|
StorIOSQLite() |
| Modifier and Type | Method and Description |
|---|---|
abstract rx.Scheduler |
defaultScheduler()
Provides a scheduler on which
Observable / Single
or Completable will be subscribed. |
PreparedDelete.Builder |
delete()
Prepares "Delete" Operation for
StorIOSQLite. |
PreparedExecuteSQL.Builder |
executeSQL()
Prepares "Execute SQL" Operation for
StorIOSQLite. |
PreparedGet.Builder |
get()
Prepares "Get" Operation for
StorIOSQLite. |
abstract StorIOSQLite.Internal |
internal()
Deprecated.
please use
lowLevel(), this one will be removed in v2.0,
basically, we just renamed it to LowLevel. |
abstract StorIOSQLite.LowLevel |
lowLevel()
An API for low level interaction with DB, it's part of public API, so feel free to use it,
but please read documentation carefully!
|
abstract rx.Observable<Changes> |
observeChanges()
Allows observe changes in all tables of the db.
|
rx.Observable<Changes> |
observeChangesInTable(java.lang.String table)
Allows observer changes of required table.
|
abstract rx.Observable<Changes> |
observeChangesInTables(java.util.Set<java.lang.String> tables)
Allows observe changes of required tables.
|
rx.Observable<Changes> |
observeChangesOfTag(java.lang.String tag)
Allows observer changes of required tag.
|
abstract rx.Observable<Changes> |
observeChangesOfTags(java.util.Set<java.lang.String> tags)
Allows observe changes of required tags.
|
PreparedPut.Builder |
put()
Prepares "Put" Operation for
StorIOSQLite. |
@NonNull public PreparedExecuteSQL.Builder executeSQL()
StorIOSQLite.
Allows to execute a single SQL statement that is NOT a SELECT/INSERT/UPDATE/DELETE.PreparedExecuteSQL.@NonNull public PreparedGet.Builder get()
StorIOSQLite.
Allows to get information from StorIOSQLite.PreparedGet.@NonNull public PreparedPut.Builder put()
StorIOSQLite.
Allows to insert/update information in StorIOSQLite.PreparedPut.@NonNull public PreparedDelete.Builder delete()
StorIOSQLite.
Allows to delete information from StorIOSQLite.PreparedDelete.@NonNull public abstract rx.Observable<Changes> observeChanges()
StorIOSQLite knows only about changes
that happened as a result of Put or Delete Operations executed
on this instance of StorIOSQLite.
Emission may happen on any thread that performed Put or Delete operation,
so it's recommended to apply Observable.observeOn(rx.Scheduler)
if you need to receive events on a special thread.
Notice, that returned Observable is "Hot Observable", it never ends, which means,
that you should manually unsubscribe from it to prevent memory leak.
Also, it can cause BackPressure problems.Observable of Changes subscribed to changes of all tables.@NonNull public abstract rx.Observable<Changes> observeChangesInTables(@NonNull java.util.Set<java.lang.String> tables)
StorIOSQLite knows only about changes
that happened as a result of Put or Delete Operations executed
on this instance of StorIOSQLite.
Emission may happen on any thread that performed Put or Delete operation,
so it's recommended to apply Observable.observeOn(rx.Scheduler)
if you need to receive events on a special thread.
Notice, that returned Observable is "Hot Observable", it never ends, which means,
that you should manually unsubscribe from it to prevent memory leak.
Also, it can cause BackPressure problems.tables - set of table names that should be monitored.Observable of Changes subscribed to changes of required tables.@NonNull public rx.Observable<Changes> observeChangesInTable(@NonNull java.lang.String table)
StorIOSQLite knows only about changes
that happened as a result of Put or Delete Operations executed
on this instance of StorIOSQLite.
Emission may happen on any thread that performed Put or Delete operation,
so it's recommended to apply Observable.observeOn(rx.Scheduler)
if you need to receive events on a special thread.
Notice, that returned Observable is "Hot Observable", it never ends, which means,
that you should manually unsubscribe from it to prevent memory leak.
Also, it can cause BackPressure problems.table - table name to monitor.Observable of Changes subscribed to changes of required table.@NonNull public abstract rx.Observable<Changes> observeChangesOfTags(@NonNull java.util.Set<java.lang.String> tags)
StorIOSQLite knows only about changes
that happened as a result of Put or Delete Operations executed
on this instance of StorIOSQLite.
Emission may happen on any thread that performed Put or Delete operation,
so it's recommended to apply Observable.observeOn(rx.Scheduler)
if you need to receive events on a special thread.
Notice, that returned Observable is "Hot Observable", it never ends, which means,
that you should manually unsubscribe from it to prevent memory leak.
Also, it can cause BackPressure problems.tags - set of tags that should be monitored.Observable of Changes subscribed to changes of required tags.@NonNull public rx.Observable<Changes> observeChangesOfTag(@NonNull java.lang.String tag)
StorIOSQLite knows only about changes
that happened as a result of Put or Delete Operations executed
on this instance of StorIOSQLite.
Emission may happen on any thread that performed Put or Delete operation,
so it's recommended to apply Observable.observeOn(rx.Scheduler)
if you need to receive events on a special thread.
Notice, that returned Observable is "Hot Observable", it never ends, which means,
that you should manually unsubscribe from it to prevent memory leak.
Also, it can cause BackPressure problems.tag - tag to monitor.Observable of Changes subscribed to changes of required tag.@Nullable public abstract rx.Scheduler defaultScheduler()
Observable / Single
or Completable will be subscribed.
null if it isn't needed to apply it.com.pushtorefresh.storio.operations.PreparedOperation#asRxObservable(),
com.pushtorefresh.storio.operations.PreparedOperation#asRxSingle(),
com.pushtorefresh.storio.operations.PreparedWriteOperation#asRxCompletable()@Deprecated @NonNull public abstract StorIOSQLite.Internal internal()
lowLevel(), this one will be removed in v2.0,
basically, we just renamed it to LowLevel.StorIOSQLite.@NonNull public abstract StorIOSQLite.LowLevel lowLevel()
StorIOSQLite.