Open kdhrubo opened 3 weeks ago
Example SQL File
SELECT * FROM public.users
WHERE age >= {{ context.params.age }};
The first one uses request parameters.
SELECT * FROM public.users
WHERE id = {{ context.paths.id }};
The second one uses path variables.
SELECT * FROM public.users
WHERE id = {{ context.headers.id }};
The third one uses http header variables.
I think Pebble might be better option as discussed in Discord thread? dunno.
Will check.
Just for confirm, the API end-point for this feature is: api/v1/sql/<filename>
Yes that's correct.
On Sun, Sep 8, 2024, 5:12 PM Nguyễn Tấn Anh @.***> wrote:
Just for confirm, the API end-point for this feature is: api/v1/sql/
— Reply to this email directly, view it on GitHub https://github.com/kdhrubo/db2rest/issues/670#issuecomment-2336841475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAISPRAHAGAHL4UNIBB2WLDZVTDULAVCNFSM6AAAAABMYVKPPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWHA2DCNBXGU . You are receiving this because you authored the thread.Message ID: @.***>
For templatized SQL all templates should be created with Jinjia.
Jinjia for Java - https://github.com/HubSpot/jinjava
Acceptance