-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
อยากสอบถามว่าตัวของ Spring data jpa นั้นสามารถที่จะปรับเปลี่ยน query statement ณ ตอน runtime ได้ไหมครับ ที่อยากได้แบบนี้เพราะอยากจะนำไปทำตัว order filter ที่หลังบ้านแล้วส่ง response ไปโชว์ที่หน้าบ้านได้เลยอะครับ usecase มีประมาณนี้ครับ
Use case
Request ที่ทาง FE ส่งเข้า
{
"orderId" : "",
"buyBy" : "Hank Artisan",
"buyAt" : "2022-03-09 15:47:54",
...
} select o from orders o where o.buyBy like :o.buyBy = :buyBy and o.buyAt = date :buyAt ;กรณีที่ไม่ส่ง parameter บาง parameter มาจะปรับ where clause ตามด้านล่าง
{
"orderId" : "",
"buyBy" : "",
"buyAt" : "2022-03-09 15:47:54",
...
} select o from orders o where o.buyAt = date :buyAt ;Metadata
Metadata
Assignees
Labels
No labels