_sql

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPoolDict

func GetPoolDict() map[string][]*sql.DB

func Load

func Load()

Types

type Cluster

type Cluster struct {
	Master []*Machine `json:"master"`
	Slaver []*Machine `json:"slaver"`
}

type Machine

type Machine struct {
	Driver    string `json:"driver"`
	Host      string `json:"host"`
	Port      string `json:"port"`
	Database  string `json:"database"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Charset   string `json:"charset"`
	Collation string `json:"collation"`
}

type Sql

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

func New

func New() *Sql

func (*Sql) Add

func (this *Sql) Add() int64

func (*Sql) AddList

func (this *Sql) AddList() int64

func (*Sql) Begin

func (this *Sql) Begin() *sql.Tx

func (*Sql) Bind

func (this *Sql) Bind(bind interface{}) *Sql

func (*Sql) Business

func (this *Sql) Business(business string) *Sql

func (*Sql) Commit

func (this *Sql) Commit()

func (*Sql) Count

func (this *Sql) Count() (o int64)

func (*Sql) Del

func (this *Sql) Del() int64

func (*Sql) Execute

func (this *Sql) Execute() int64

func (*Sql) Field

func (this *Sql) Field(field string) *Sql

func (*Sql) Get

func (this *Sql) Get() (o map[string]string)

func (*Sql) GetList

func (this *Sql) GetList() (o []map[string]string)

func (*Sql) Group

func (this *Sql) Group(group string) *Sql

func (*Sql) Having added in v1.2.0

func (this *Sql) Having(having string) *Sql

func (*Sql) Ignore added in v1.2.0

func (this *Sql) Ignore(ignore ...string) *Sql

func (*Sql) Index

func (this *Sql) Index(index string) *Sql

func (*Sql) Limit

func (this *Sql) Limit(limit int) *Sql

func (*Sql) Machine

func (this *Sql) Machine(machine *Machine) *Sql

func (*Sql) Master

func (this *Sql) Master(master bool) *Sql

func (*Sql) MasterMachine

func (this *Sql) MasterMachine(machine *Machine) *Sql

func (*Sql) Offset

func (this *Sql) Offset(offset int) *Sql

func (*Sql) Order

func (this *Sql) Order(order string) *Sql

func (*Sql) Parameter

func (this *Sql) Parameter(parameter ...interface{}) *Sql

func (*Sql) Pool

func (this *Sql) Pool(pool *sql.DB) *Sql

func (*Sql) Query

func (this *Sql) Query() []map[string]string

func (*Sql) Rollback

func (this *Sql) Rollback()

func (*Sql) Row

func (this *Sql) Row(row map[string]interface{}) *Sql

func (*Sql) RowList

func (this *Sql) RowList(rowList []map[string]interface{}) *Sql

func (*Sql) Set

func (this *Sql) Set() int64

func (*Sql) SlaverMachine

func (this *Sql) SlaverMachine(machine *Machine) *Sql

func (*Sql) Sql

func (this *Sql) Sql(sql string) *Sql

func (*Sql) Table

func (this *Sql) Table(table string) *Sql

func (*Sql) Transaction

func (this *Sql) Transaction(group func(tx *sql.Tx))

func (*Sql) Tx

func (this *Sql) Tx(tx *sql.Tx) *Sql

func (*Sql) Where

func (this *Sql) Where(where string) *Sql

Jump to

Keyboard shortcuts

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