sqltransaction

package
v1.56.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sqltransaction helps executing a function inside an SQL transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(ctx context.Context, db *sql.DB, run ExecFunc) error

Exec executes the specified function inside a SQL transaction.

Types

type ExecFunc

type ExecFunc func(ctx context.Context, tx *sql.Tx) error

ExecFunc is the type of the function to be executed inside a SQL Transaction.

Jump to

Keyboard shortcuts

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