Skip to content

Commit

Permalink
Update README.md for 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sinyu890807 committed Mar 1, 2016
1 parent fdd2c3c commit a5f5de9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Experience the magic right now and have fun!
* More for you to explore.

## Latest Downloads
* **[litepal-1.3.0.jar](https://github.com/LitePalFramework/LitePal/raw/master/downloads/litepal-1.3.0.jar)** (library contains *.class files)
* **[litepal-1.3.0-src.jar](https://github.com/LitePalFramework/LitePal/raw/master/downloads/litepal-1.3.0-src.jar)** (library contains *.class files and *.java files)
* **[litepal-1.3.1.jar](https://github.com/LitePalFramework/LitePal/raw/master/downloads/litepal-1.3.1.jar)** (library contains *.class files)
* **[litepal-1.3.1-src.jar](https://github.com/LitePalFramework/LitePal/raw/master/downloads/litepal-1.3.1-src.jar)** (library contains *.class files and *.java files)

## Quick Setup
#### 1. Include library
Expand All @@ -28,7 +28,7 @@ Experience the magic right now and have fun!
Edit your **build.gradle** file and add below dependency:
``` groovy
dependencies {
compile 'org.litepal.android:core:1.3.0'
compile 'org.litepal.android:core:1.3.1'
}
```
#### 2. Configure litepal.xml
Expand Down Expand Up @@ -131,6 +131,8 @@ public class Album extends DataSupport {

private float price;

private byte[] cover;

private List<Song> songs = new ArrayList<Song>();

// generated getters and setters.
Expand Down Expand Up @@ -170,7 +172,8 @@ Now the tables will be generated automatically with SQLs like this:
CREATE TABLE album (
id integer primary key autoincrement,
name text unique default 'unknown',
price real
price real,
cover blob
);

CREATE TABLE song (
Expand All @@ -192,6 +195,8 @@ public class Album extends DataSupport {
@Column(ignore = true)
private float price;

private byte[] cover;

private Date releaseDate;

private List<Song> songs = new ArrayList<Song>();
Expand Down Expand Up @@ -229,6 +234,7 @@ The saving API is quite object oriented. Each model which inherits from **DataSu
Album album = new Album();
album.setName("album");
album.setPrice(10.99f);
album.setCover(getCoverImageBytes());
album.save();
Song song1 = new Song();
song1.setName("song1");
Expand Down Expand Up @@ -301,6 +307,10 @@ Get it on:
If you find any bug when using LitePal, please report **[here](https://github.com/LitePalFramework/LitePal/issues/new)**. Thanks for helping us building a better one.

## Change logs
### 1.3.1
* Support storing binary data. Byte array field will be mapped into database as blob type.
* Add **saveFast()** method in DataSupport. If your model has no associations to handle, use **saveFast()** method will be much more efficient.
* Improve query speed with optimized algorithm.
### 1.3.0
* Add annotation functions to decalre **unique**, **not null** and **default** constraints.
* Remove the trick of ignore mapping fields with non-private modifier.
Expand Down

0 comments on commit a5f5de9

Please sign in to comment.