server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetDbServer = (func() func(proj string, path string) *DbServer {

	mapServer := make(map[string]*DbServer)

	return func(proj string, path string) *DbServer {
		_, ok := mapServer[proj]
		if !ok {
			md := new(DbServer)
			md.Init(path)
			mapServer[proj] = md
		}

		return mapServer[proj]
	}
})()

Functions

This section is empty.

Types

type DbServer

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

func (*DbServer) DirectExec

func (c *DbServer) DirectExec(strSql string) bool

exec sql

func (*DbServer) DirectInsert

func (c *DbServer) DirectInsert(strSql string) (int64, error)

insert sql

func (*DbServer) DirectQuery

func (c *DbServer) DirectQuery(strSql string) []map[string]interface{}

query sql

func (*DbServer) Exec

func (c *DbServer) Exec(strSql string, arrParam []interface{}) bool

exec sql

func (*DbServer) Init

func (c *DbServer) Init(path string)

database connect database

func (*DbServer) Insert

func (c *DbServer) Insert(strSql string, arrParam []interface{}) (int64, error)

insert sql

func (*DbServer) Query

func (c *DbServer) Query(strSql string, arrParam []interface{}) []map[string]interface{}

query sql

Jump to

Keyboard shortcuts

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