dbo

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DRIVER added in v1.1.1

type DRIVER string
const (
	DRIVER_MYSQL DRIVER = "mysql"
	DRIVER_PGSQL DRIVER = "pgsql"
)

func Driver

func Driver(opts *Options) DRIVER

type Options added in v1.1.1

type Options struct {
	Driver   DRIVER
	Host     string
	Port     string
	Username string
	Password string
	DBName   string
	URL      string
}

type TxDB

type TxDB struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func New

func New(tx *gorm.DB, opts *Options) *TxDB

func (*TxDB) Transaction

func (tx *TxDB) Transaction(fn TxFunction) error

type TxFunction

type TxFunction func(tx *TxDB) error

Jump to

Keyboard shortcuts

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