geeorm

package module
v0.0.0-...-bce3628 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(driver, source string) (e *Engine, err error)

func (*Engine) Close

func (engine *Engine) Close()

func (*Engine) NewSession

func (engine *Engine) NewSession() *session.Session

func (*Engine) Transaction

func (engine *Engine) Transaction(f TxFunc) (result interface{}, err error)

Transaction executes sql wrapped in a transaction, then automatically commit if no error occurs

type TxFunc

type TxFunc func(*session.Session) (interface{}, error)

TxFunc will be called between tx.Begin() and tx.Commit() https://stackoverflow.com/questions/16184238/database-sql-tx-detecting-commit-or-rollback

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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