The query parameters to generate query on databse.
public class Student extends PanacheEntityBase {
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
@Column(name = "uuid", unique = true)
@Id
public String uuid;
public String name;
public String surname;
public String tags;
// ie: IT, FR, DE
public String nationality;
public Integer age;
public String school_uuid;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Europe/Rome")
public LocalDate birthday_date;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Europe/Rome")
public LocalDate last_examen_date;
public boolean active;
}
- GET: /api/v1/users?like.surname=Pizz
- QUERY CONDITION: select * from users where lowercase(surname) = :surname
- QUERY PARAMETER: surname= '%'+lowercase(like.surname) +'%'
- GET: /api/v1/users?obj.nationality=IT
- QUERY CONDITION: select * from users where nationality = :nationality
- QUERY PARAMETER: nationality = obj.nationality
- GET: /api/v1/users?obj.nationalities=IT,FR,DE
- QUERY CONDITION: select * from users where nationality IN (:nationality_list)
- QUERY PARAMETER: nationality_list = [ 'IT','FR','DE' ]
- GET: /api/v1/users?nil.last_examen_date=xxxxx
- QUERY CONDITION: select * from users where last_examen_date IS NOT NULL
- GET: /api/v1/users?null.last_examen_date=2021-01-31
- QUERY CONDITION: select * from users where last_examen_date IS NULL
- GET: /api/v1/users?from.last_examen_date=2021-01-01&to.last_examen_date=2021-01-31
- QUERY CONDITION: select * from users where last_examen_date >= :from_date AND last_examen_date <: to_date
- QUERY PARAMETER: from_date = from.last_examen_date - to_date=to.last_examen_date
- from, to, like, obj, not, nil
- startRow: (default is 0)
- pageSize: (default is 10)
- orderBy