dbr

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecInSession added in v0.0.14

func ExecInSession(conn *dbr.Connection, log dbr.EventReceiver, fnOnSession func(*dbr.Session) error) error

ExecInSession executes a given query in a newly created session

func ExecInSessionNoLog added in v0.0.15

func ExecInSessionNoLog(conn *dbr.Connection, fnOnSession func(*dbr.Session) error) error

ExecInSessionNoLog executes a given query in a newly created session with no event receiver

func NewConnection

func NewConnection(driverName string, dataSourceName string, eventReceiver dbr.EventReceiver) (*dbr.Connection, error)

NewConnection creates a new dbr connection

func Transact

func Transact(sess *dbr.Session, fnTransact func(*dbr.Tx) error) error

Transact performs a transaction on a given database

func TransactExec

func TransactExec(tx *dbr.Tx, query string, args ...interface{}) (sql.Result, error)

TransactExec executes the query with args inside the transaction

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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