annotations/db_annotations library

Classes

DB
Annotation for create database. It must be applied on an abstract class. Database entities(tables) must be defined in this annotation. Configuration methods like OnConfigure, OnCreate, OnOpen, OnUpgrade and OnDowngrade for actions like Migration can implement in the class that this annotation applied on. Also, Dao classes must be defined in the class that this annotation applied on as an abstract method. TypeConverters annotation also apply on the class that this annotation applied on.
DBBuilder
Annotation for initialize databases and generate methods for access to databases. It must be applied on an abstract class. You don't need to do anything extra.
OnConfigure
Annotation for define OnConfigure method for database. Prototype of the function called before calling onCreate/onUpdate/onOpen when the database is open. Post initialization should happen here. This annotation must be applied on a method in the database class. Method syntax is also important. Example:
OnDowngrade
Annotation for define Migration(OnDowngrade) method for database. Prototype of the function called when the version has decreased. Schema migration (adding column, adding table, adding trigger...) should happen here. This annotation must be applied on a method in the database class. Method syntax is also important. Example:
OnOpen
Annotation for define OnOpen method for database. Prototype of the function called when the database is open. Post initialization should happen here. This annotation must be applied on a method in the database class. Method syntax is also important. Example:
OnUpgrade
Annotation for define Migration(OnUpgrade) method for database. Prototype of the function called when the version has increased. Schema migration (adding column, adding table, adding trigger...) should happen here. This annotation must be applied on a method in the database class. Method syntax is also important. Example:
TypeConverter
Annotation for methods that implement conversion tools. These methods must be defined in the class that passed to TypeConverters annotation as an abstract method.
TypeConverters
Annotation for define type converters for database. You have to apply this annotation on class that DB annotation applied on. You have to pass a class to this annotation that whose methods implement conversion rules.