The statements the search endpoint made
GET /api/employees/search?departmentId=2 1 statement
Hibernate: select e1_0.id,d1_0.id,d1_0.name,e1_0.email,e1_0.name,e1_0.phone,e1_0.start_date
from employee e1_0 left join department d1_0 on d1_0.id=e1_0.department_id
where e1_0.department_id=? offset ? rows fetch first ? rows only
GET /api/employees/search?name=an 1 statement
Hibernate: select … from employee e1_0 left join department d1_0 on d1_0.id=e1_0.department_id
where lower(e1_0.name) like ? escape '' offset ? rows fetch first ? rows only
GET /api/employees/search?departmentId=2&startedAfter=2021-01-01&sort=startDate,desc&size=2 2 statements
Hibernate: select … from employee e1_0 left join department d1_0 on d1_0.id=e1_0.department_id
where e1_0.department_id=? and e1_0.start_date>? order by e1_0.start_date desc
offset ? rows fetch first ? rows only
Hibernate: select count(e1_0.id) from employee e1_0 where e1_0.department_id=? and e1_0.start_date>?
{"items":[{"id":8,"name":"Laura White","email":"laura.white@example.com","departmentName":"Engineering"},
{"id":7,"name":"Chris Evans","email":"chris.evans@example.com","departmentName":"Engineering"}],
"page":0,"totalPages":1,"totalElements":2}
- The same endpoint, a different
where for each set of parameters
- The first two have no count statement: the matches fit in the default page of 20, so the total is known from the slice