Upgrade to Pro — share decks privately, control downloads, hide ads and more …

sqlbrite with AutoValue

bowyer-app
August 05, 2016
420

sqlbrite with AutoValue

sqlbriteとAutoValueを使った実装の話です

bowyer-app

August 05, 2016
Tweet

Transcript

  1. 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
  2. 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
  3. 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