Slide 1

Slide 1 text

sqlbrite with AutoValue bowyer-app @umeda.apk #2

Slide 2

Slide 2 text

What is sqlbrite? • Lightweight wrapper around SQLiteOpenHelper • Reactive stream semantics to SQL operations

Slide 3

Slide 3 text

Select all with SQLite

Slide 4

Slide 4 text

Select all with sqlbrite return stream

Slide 5

Slide 5 text

Adapter with SQLite

Slide 6

Slide 6 text

Adapter with sqlbrite receive as Action

Slide 7

Slide 7 text

Auto Value and Extensions • Auto Value
 Add @AutoValue to make objects value-typed using generated boilerplate code • Auto Value Parcel
 Just add implements Parcelable to your @AutoValue annotated models. • Auto Value Cursor
 generates a createFromCursor(Cursor c) method for AutoValue annotated objects. • Auto Value Cursor Annotations
 use the annotation if column name and field name aren't the same, use @ColumnName

Slide 8

Slide 8 text

Dto with Parcelable is too long

Slide 9

Slide 9 text

Dto with Auto Value and Extensions auto-cursor create mapper method that’s all to use Parcelable auto-value-cursor- annotations can use another name

Slide 10

Slide 10 text

Conclusion • sqlbrite is easy to use SQLite and provide Reactive stream • AutoValue and Extensions simplify your POJO • sqlbrite with AutoValue make your around database code simplify and readable

Slide 11

Slide 11 text

Sample Code • “PlayerManage” - bowyer-app
 https://github.com/bowyer-app/ PlayerManage