Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { *revel.Controller DB *gorm.DB }
Controller is a Revel controller with a pointer to the opened database
type TxnController ¶
type TxnController struct { *revel.Controller Txn *gorm.DB }
TxnController is a Revel controller with database transaction support (begin, commit and rollback)
func (*TxnController) Begin ¶
func (c *TxnController) Begin() revel.Result
Begin begins a DB transaction
func (*TxnController) Commit ¶
func (c *TxnController) Commit() revel.Result
Commit commits the database transation
func (*TxnController) Rollback ¶
func (c *TxnController) Rollback() revel.Result
Rollback rolls back the transaction (eg. after a panic)
Click to show internal directories.
Click to hide internal directories.