transaction-per-function

IN premise

Every API function opens the database, does its work, and closes — no shared state, no connection pooling, no long-lived sessions; each invocation is fully independent.

Summary

Each API function is completely self-contained — it opens a fresh database connection, does what it needs to do, and closes it. There is no shared state between calls, which makes the system simple and stateless but means every request pays the cost of opening and closing a connection.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/23/reasons_lib-api.md