lib

package
v0.0.0-...-bf94cd9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mysql

type Mysql struct {
	Db *sql.DB

	Sql string

	Config MysqlConfigType

	Connected bool
}

func (*Mysql) Connect

func (this *Mysql) Connect() (bool, error)

func (*Mysql) GetRow

func (this *Mysql) GetRow(sql string, args ...interface{}) map[string]string

查询单行封装

func (*Mysql) GetRows

func (this *Mysql) GetRows(sql string, args ...interface{}) []map[string]string

查询多行封装

func (*Mysql) Insert

func (this *Mysql) Insert(sql string, args ...interface{}) (int64, error)

插入 封装

func (*Mysql) Remove

func (this *Mysql) Remove(sql string, args ...interface{}) (int64, error)

删除数据

func (*Mysql) Update

func (this *Mysql) Update(sql string, args ...interface{}) (int64, error)

更新数据

type MysqlConfigType

type MysqlConfigType struct {
	Database     string `toml:"database"`
	User         string `toml:"user"`
	Password     string `toml:"password"`
	Host         string `toml:"host"`
	Port         string `toml:"port"`
	Charset      string `toml:"charset"`
	Timeout      string `toml:"timeout"`
	MaxOpenConns int    `toml:"max_open_conns"`
	MaxIdleConns int    `toml:"max_idle_conns"`
}

Directories

Path Synopsis
BurntSushi
garyburd
redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
redigo/redisx
Package redisx contains experimental features for Redigo.
Package redisx contains experimental features for Redigo.
Package mgo offers a rich MongoDB driver for Go.
Package mgo offers a rich MongoDB driver for Go.
bson
Package bson is an implementation of the BSON specification for Go:
Package bson is an implementation of the BSON specification for Go:
internal/scram
Pacakage scram implements a SCRAM-{SHA-1,etc} client per RFC5802.
Pacakage scram implements a SCRAM-{SHA-1,etc} client per RFC5802.
testserver
WARNING: This package was replaced by mgo.v2/dbtest.
WARNING: This package was replaced by mgo.v2/dbtest.
txn
The txn package implements support for multi-document transactions.
The txn package implements support for multi-document transactions.
A thread safe map implementation for Golang
A thread safe map implementation for Golang
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.

Jump to

Keyboard shortcuts

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