db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tx

func Tx(ctx context.Context, env *env.Env, opts *sql.TxOptions) (*sql.Tx, error)

Tx opens a database connection and starts a database transaction using the BeginTx method which allows for rollback of the transaction if the context is cancelled

func Tx2Context

func Tx2Context(ctx context.Context, env *env.Env, opts *sql.TxOptions) context.Context

Tx2Context returns Context carrying the database transaction (tx).

func TxFromContext

func TxFromContext(ctx context.Context) (*sql.Tx, bool)

TxFromContext extracts the database transaction from the context, if present.

Types

This section is empty.

Jump to

Keyboard shortcuts

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