db

package
v0.0.0-...-f0efb94 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMysqlConnectMap = NewMysqlConnectMap()

Functions

This section is empty.

Types

type DbPool

type DbPool interface {
	InitMap()
	InitConnection(spiderName, url string)
	CloseContection(spiderName string)
	Query(spiderName, query string, args ...interface{}) (*sql.Rows, error)
	Exec(spiderName, query string, args ...interface{}) (sql.Result, error)
}

* contain all db connect for spiders

type MysqlConnectMap

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

func NewMysqlConnectMap

func NewMysqlConnectMap() *MysqlConnectMap

func (*MysqlConnectMap) CloseContection

func (this *MysqlConnectMap) CloseContection(spiderName string)

func (*MysqlConnectMap) Exec

func (this *MysqlConnectMap) Exec(spiderName, query string, args ...interface{}) (sql.Result, error)

func (*MysqlConnectMap) InitConnection

func (this *MysqlConnectMap) InitConnection(spiderName, url string)

func (*MysqlConnectMap) InitMap

func (this *MysqlConnectMap) InitMap()

func (*MysqlConnectMap) Query

func (this *MysqlConnectMap) Query(spiderName, query string, args ...interface{}) (*sql.Rows, error)

Jump to

Keyboard shortcuts

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