implement basic patients routes
This commit is contained in:
3
queries/create_patient.sql
Normal file
3
queries/create_patient.sql
Normal file
@ -0,0 +1,3 @@
|
||||
insert into patients ("full_name", "phone")
|
||||
values($1,$2)
|
||||
returning "id";
|
||||
3
queries/delete_patient.sql
Normal file
3
queries/delete_patient.sql
Normal file
@ -0,0 +1,3 @@
|
||||
delete from patients
|
||||
where id = $1
|
||||
returning *;
|
||||
1
queries/get_all.sql
Normal file
1
queries/get_all.sql
Normal file
@ -0,0 +1 @@
|
||||
select * from "patients"
|
||||
2
queries/get_patient_by_id.sql
Normal file
2
queries/get_patient_by_id.sql
Normal file
@ -0,0 +1,2 @@
|
||||
select * from "patients"
|
||||
where id = $1;
|
||||
3
queries/update_patient.sql
Normal file
3
queries/update_patient.sql
Normal file
@ -0,0 +1,3 @@
|
||||
update patients
|
||||
set full_name = $2, phone = $3
|
||||
where id = $1;
|
||||
Reference in New Issue
Block a user