 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
This module configures a database connection for the application.
Developers use this module by importing and calling db.Init(). A "Transactional" controller type is provided as a way to import interceptors that manage the transaction
In particular, a transaction is begun before each request and committed on success. If a panic occurred during the request, the transaction is rolled back. (The application may also roll the transaction back itself.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( Db *sql.DB Driver string Spec string )
Functions ¶
Types ¶
type Transactional ¶
type Transactional struct {
	*revel.Controller
	Txn *sql.Tx
}
    func (*Transactional) Commit ¶
func (c *Transactional) Commit() revel.Result
Commit the transaction.
func (*Transactional) Rollback ¶
func (c *Transactional) Rollback() revel.Result
Rollback if it's still going (must have panicked).
 Click to show internal directories. 
   Click to hide internal directories.