Specifies in which order the result of a select query should be returned. It is possible to add one or more OrderBy attributes to the same method with different field names.
Indicates that a newly created entity will be inserted in the database. If the entity has one or more primary keys their values will be updated.
Specifies that the result of a select query should be returned randomly ordered. This action is usually performed directly from the database. It's not possible to use any other order attribute associated with this one.
Deletes one or more entities from the database. If the entity does not have any primary key the Where attribute must also be present.
Indicates that one or more entities will be selected from the database. The return type of a method marked with the @Select atribute can be either T or T[], where T is the entity specified in the repository's declaration.
Indicates that an existing entity will be updated. The updated fields can be specified with the Fields attribute; if the attributes is not present all fields except the primary keys will be updated. If the entity does not have any primary key the Where attribute must also be present.
Base interface for repositories. Every repository that implements this interface will be extended by scorpion and its methods implemented. Every method in the interface must have either the attribute @Select, @Insert, @Update or @Remove that indicates which action the repository will perform using the database.
Indicates which field(s) to update when updating an entity. This is useful when having an entity with a field that holds big data and and a small field that is updated frequently. By adding the Fields attribute the big data is not sent to the database and updated every time the small field is, saving time.
Limits the number of results returned by a select query. It is possible, like in the Where attribute, to specify a value using the arguments by adding the dollar sign and the argument's index in the method.
Adds a where clause to the query. This attribute can be used with query that select, update and remove entities. It is possible to use method's arguments in the where clause by adding the dollar sign plus the index (starting from 0, obviously) of the variable.