sqlhelper

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 7 Imported by: 0

README

sqlhelper

sqlhelper for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database added in v0.0.2

type Database interface {
	GetAll(sql string, args ...interface{}) ([]map[string]interface{}, error)
	GetOne(sql string, args ...interface{}) (map[string]interface{}, error)
	Insert(table string, data map[string]interface{}) (int64, error)
	Update(table, condition string, data map[string]interface{}, args ...interface{}) (int64, error)
	Delete(table, condition string, args ...interface{}) (int64, error)
	SetMaxOpenConns(count int)
	SetMaxIdleConns(count int)
	SetConnMaxLifetime(second int)
}

func OpenDatabase added in v0.0.2

func OpenDatabase(conn string) (Database, error)

初始化链接

Jump to

Keyboard shortcuts

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