Skip to content
This repository was archived by the owner on Aug 17, 2020. It is now read-only.

Commit f57c3d2

Browse files
committed
Prepare for release 0.3.0.
1 parent ac27420 commit f57c3d2

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
Change 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+
423
Version 0.2.1 *(2015-07-14)*
524
----------------------------
625

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,19 @@ users.subscribe(new Action1<Query>() {
8989
});
9090
System.out.println("Queries: " + queries.get()); // Prints 1
9191

92-
db.beginTransaction();
92+
Transaction transaction = db.newTransaction();
9393
try {
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

102102
System.out.println("Queries: " + queries.get()); // Prints 2
103103
```
104+
*Note: You can also use try-with-resources with a `Transaction` instance.*
104105

105106
Since queries are just regular RxJava `Observable` objects, operators can also be used to
106107
control 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

149150
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.squareup.sqlbrite
2-
VERSION_NAME=0.3.0-SNAPSHOT
2+
VERSION_NAME=0.3.0
33

44
POM_DESCRIPTION=A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
55

0 commit comments

Comments
 (0)