Add crud-mysql module: Spring Boot 4.1 CRUD API on a real MySQL 8.4.6 with JPA, Flyway, validation and ProblemDetail errors
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HhW8LD8r3EigoBaCGrQZx5 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HhW8LD8r3EigoBaCGrQZx5
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# The SQL Hibernate sent for each request (recorded by a StatementInspector)
|
||||
|
||||
|
||||
--- create: POST /api/books -> HTTP 201 ---
|
||||
insert into book (author,isbn,price,title) values (?,?,?,?)
|
||||
|
||||
--- read one: GET /api/books/1 -> HTTP 200 ---
|
||||
select b1_0.id,b1_0.author,b1_0.isbn,b1_0.price,b1_0.title from book b1_0 where b1_0.id=?
|
||||
|
||||
--- list page 0, size 2: GET /api/books?page=0&size=2 -> HTTP 200 ---
|
||||
select b1_0.id,b1_0.author,b1_0.isbn,b1_0.price,b1_0.title from book b1_0 order by b1_0.id limit ?,?
|
||||
select count(b1_0.id) from book b1_0
|
||||
|
||||
--- list filtered by author: GET /api/books?author=bloch -> HTTP 200 ---
|
||||
select b1_0.id,b1_0.author,b1_0.isbn,b1_0.price,b1_0.title from book b1_0 where upper(b1_0.author) like upper(?) escape '\\' order by b1_0.id limit ?
|
||||
|
||||
--- update: PUT /api/books/1 -> HTTP 200 ---
|
||||
select b1_0.id,b1_0.author,b1_0.isbn,b1_0.price,b1_0.title from book b1_0 where b1_0.id=?
|
||||
update book set author=?,isbn=?,price=?,title=? where id=?
|
||||
|
||||
--- delete: DELETE /api/books/1 -> HTTP 204 ---
|
||||
select b1_0.id,b1_0.author,b1_0.isbn,b1_0.price,b1_0.title from book b1_0 where b1_0.id=?
|
||||
delete from book where id=?
|
||||
Reference in New Issue
Block a user