db

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn truct

func (*Conn) Close

func (conn *Conn) Close()

Close Close Connection

func (*Conn) Connect

func (conn *Conn) Connect(dbhost string, dbport string, database string, user string, password string) bool

Connect Connect to database

func (*Conn) Excute

func (conn *Conn) Excute(sql string, args ...interface{}) (sql.Result, bool)

Excute the insert and update sql

func (*Conn) Query

func (conn *Conn) Query(sql string, args ...interface{}) ([]map[string]string, bool)

Query 执行查询语句,返回结果

func (*Conn) QueryNum

func (conn *Conn) QueryNum(sql string, args ...interface{}) int64

QueryNum return num

func (*Conn) QueryStringOne

func (conn *Conn) QueryStringOne(sql string, args ...interface{}) string

QueryStringOne return string result

Jump to

Keyboard shortcuts

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