mysqlmondule

package
v0.0.0-...-ff803ae Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBExecute

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

type DBResult

type DBResult struct {
	LastInsertID int64
	RowsAffected int64

	RowInfo map[string][]interface{} //map[fieldname][row]sql.NullString
	// contains filtered or unexported fields
}

DBResult ...

type DataSetList

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

func (*DataSetList) UnMarshal

func (ds *DataSetList) UnMarshal(args ...interface{}) error

type MySQLModule

type MySQLModule struct {
	service.Module
	// contains filtered or unexported fields
}

DBModule ...

func (*MySQLModule) Begin

func (m *MySQLModule) Begin() (*Tx, error)

Begin starts a transaction.

func (*MySQLModule) Exec

func (m *MySQLModule) Exec(strSql string, args ...interface{}) (*DBResult, error)

Exec ...

func (*MySQLModule) Init

func (m *MySQLModule) Init(url string, userName string, password string, dbname string, maxConn int) error

func (*MySQLModule) Query

func (m *MySQLModule) Query(strQuery string, args ...interface{}) (*DataSetList, error)

func (*MySQLModule) SetQuerySlowTime

func (m *MySQLModule) SetQuerySlowTime(slowDuration time.Duration)

type PingExecute

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

type SyncFun

type SyncFun func()

type Tx

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

Tx ...

func (*Tx) Commit

func (slf *Tx) Commit() error

Commit commits the transaction.

func (*Tx) Exec

func (slf *Tx) Exec(strSql string, args ...interface{}) (*DBResult, error)

Exec executes a query that doesn't return rows.

func (*Tx) Query

func (slf *Tx) Query(strQuery string, args ...interface{}) (*DataSetList, error)

QueryEx executes a query that return rows.

func (*Tx) Rollback

func (slf *Tx) Rollback() error

Rollback aborts the transaction.

Jump to

Keyboard shortcuts

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