Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transaction ¶
func Transaction(db *pop.Connection) buffalo.MiddlewareFunc
PopTransaction is a piece of Buffalo middleware that wraps each request in a transaction. The transaction will automatically get committed if there's no errors and the response status code is a 2xx or 3xx, otherwise it'll be rolled back. It will also add a field to the log, "db", that shows the total duration spent during the request making database calls.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.