This repository was archived by the owner on Aug 17, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed
Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 11Change Log
22=========
33
4+ Version 0.3.0 * (2015-08-31)*
5+ ----------------------------
6+
7+ * Transactions are now exposed as objects instead of methods. Call ` newTransaction() ` to start a
8+ transaction. On the ` Transaction ` instance, call ` markSuccessful() ` to indicate success and
9+ ` end() ` to commit or rollback the transaction. The ` Transaction ` instance implements ` Closeable `
10+ to allow its use in a try-with-resources construct. See the ` newTransaction() ` Javadoc for more
11+ information.
12+ * ` Query ` instances can now be turned directly into an ` Observable<T> ` by calling ` asRows ` with a
13+ ` Func1<Cursor, T> ` that maps rows to a type ` T ` . This allows easy filtering and limiting in
14+ memory rather than in the query. See the ` asRows ` Javadoc for more information.
15+ * ` createQuery ` now returns a ` QueryObservable ` which offers a ` mapToList ` operator. This operator
16+ also takes a ` Func1<Cursor, T> ` for mapping rows to a type ` T ` , but instead of individual rows it
17+ collects all the rows into a list. For large query results or frequently updated tables this can
18+ create a lot of objects. See the ` mapToList ` Javadoc for more information.
19+ * New: Nullability, ` @CheckResult ` , and ` @WorkerThread ` annotations on all APIs allow a more useful
20+ interaction with lint in consuming projects.
21+
22+
423Version 0.2.1 * (2015-07-14)*
524----------------------------
625
Original file line number Diff line number Diff line change @@ -89,18 +89,19 @@ users.subscribe(new Action1<Query>() {
8989});
9090System . out. println(" Queries: " + queries. get()); // Prints 1
9191
92- db. beginTransaction ();
92+ Transaction transaction = db. newTransaction ();
9393try {
9494 db. insert(" users" , createUser(" jw" , " Jake Wharton" ));
9595 db. insert(" users" , createUser(" mattp" , " Matt Precious" ));
9696 db. insert(" users" , createUser(" strong" , " Alec Strong" ));
97- db . setTransactionSuccessful ();
97+ transaction . setSuccessful ();
9898} finally {
99- db . endTransaction ();
99+ transaction . end ();
100100}
101101
102102System . out. println(" Queries: " + queries. get()); // Prints 2
103103```
104+ * Note: You can also use try-with-resources with a ` Transaction ` instance.*
104105
105106Since queries are just regular RxJava ` Observable ` objects, operators can also be used to
106107control the frequency of notifications to subscribers.
@@ -143,7 +144,7 @@ Download
143144--------
144145
145146``` groovy
146- compile 'com.squareup.sqlbrite:sqlbrite:0.2.1 '
147+ compile 'com.squareup.sqlbrite:sqlbrite:0.3.0 '
147148```
148149
149150Snapshots of the development version are available in [ Sonatype's ` snapshots ` repository] [ snap ] .
Original file line number Diff line number Diff line change 11GROUP =com.squareup.sqlbrite
2- VERSION_NAME =0.3.0-SNAPSHOT
2+ VERSION_NAME =0.3.0
33
44POM_DESCRIPTION =A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
55
You can’t perform that action at this time.
0 commit comments