Simple and powerful ORM for Android

Full Documentation: ReActiveAndroid
ReActiveAndroid is Android ORM based on popular library ActiveAndroid. Unfortunately, the author of the library stopped maintaining it, so I decided to continue maintain the library instead of him.
New features in ReActiveAndroid in comparison with ActiveAndroid:
In the plans:
Add this to your app build.gradle:
implementation 'com.reactiveandroid:reactiveandroid:1.4.3'First, we need to create a database class:
@Database(name = "MyDatabase", version = 1)
public class AppDatabase {
}In the @Database annotation we specified the name of the database without an extension and the version of the schema.
Next, we need to initialize the library in the onCreate method of the Application class:
DatabaseConfig appDatabase = new DatabaseConfig.Builder(AppDatabase.class)
.build();
ReActiveAndroid.init(new ReActiveConfig.Builder(this)
.addDatabaseConfigs(appDatabase)
.build());To create a table, we need to create a model class that inherits from the Model class and annotate it with @Table:
…In the @Table annotation we specify table name and the database class in which the table belongs. Also you can create a model class without inheritance from the Model, but then you will not have access to save() and delete() methods.
Now we can save, update and delete records:
Note note = new Note("Title", "Text");
note.save();
note.setText("New text");
note.save();
note.delete();Building a query in ReActiveAndroid is like building a normal SQL statement:
//inserting record
Insert.into(Note.class).columns("title", "text").values("Title", "Text").execute();
//getting all table records
List notes = Select.from(Note.class).fetch();
//getting a specific record
Note note = Select.from(Note.class).where("id = ?", 1).fetchSingle();
//getting a selection of records
List notes = Select.from(Note.class).where("title = ?", "title").fetch();
//updating record
Update.table(Note.class).set("title = ?", "New title").where("id = ?", 1).execute();
//deleting record
Delete.from(Note.class).where("id = ?", 1).execute();…No open issues yet, or sync has not completed.