annotations/dao_annotations library

Classes

Dao
Annotation for create data access object. It must be applied on an abstract class. In the class that this annotation applied on, you can define methods for access and manipulate data in tables
Delete
Annotation for define a delete method. Methods that annotated with this annotation can have only one input parameter that is an Entity and cannot be nullable. The return type can be Future
DeleteParam
Insert
Annotation for define an insert method. Methods that annotated with this annotation can have only one input parameter that is an Entity or List of an Entity and cannot be nullable. If the input parameter is Entity, the return type can be Future
InsertParam
Query
Annotation for define raw query for access or manipulate data. You have to pass your raw query as a String to query property of this annotation. You have to detect the return type, yourself. You can fetch raw results as List<Map<String, Object?>>? by using RawData class as the return type. Also, you can fetch results as a custom class. In this case you must pass that custom class to the SingularReturnType annotation. For better query, you can have any number of input parameters and you can pass these parameters to query using the colon(:) symbol. Examples:
QueryParam
SingularReturnType
Transactional
Annotation for define transaction on database. For define transaction you have to use other dao methods name as sequentialActions and pass required parameters by InsertParam, UpdateParam, DeleteParam and QueryParam annotations. The return type of these methods must be Future
Update
Annotation for define an update method. Methods that annotated with this annotation can have only one input parameter that is an Entity or List of an Entity and cannot be nullable. If the input parameter is Entity, the return type can be Future
UpdateParam