| ▲ | littlecranky67 15 hours ago | ||||||||||||||||
What is the default way in Rust to write REST endpoints and have the REST endpoint use/create handles to your database transaction that is bound in scope to the underlying HTTP request? (i.e. transaction lifetime and commit/rollback is linked to the HTTP request succeeding) | |||||||||||||||||
| ▲ | tormeh 13 hours ago | parent [-] | ||||||||||||||||
Often each API route will have its own handler function. That function will - usually through many layers of indirection and abstraction - launch queries towards your database. | |||||||||||||||||
| |||||||||||||||||