gorpController

package
v0.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 3 Imported by: 0

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
	Txn *gorp.Transaction
	Db  *gorp.DbGorp
}

Controller definition for database transaction This controller is only useful if you intend to use the database instance defined in github.com/revel/modules/orm/gorp/app.Db

func (*Controller) Begin

func (c *Controller) Begin() revel.Result

Begin a transaction

func (*Controller) Commit

func (c *Controller) Commit() revel.Result

Commit the transaction.

func (*Controller) Rollback

func (c *Controller) Rollback() revel.Result

Rollback if it's still going (must have panicked).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL