Documentation ¶
Index ¶
- Variables
- type DbPool
- type MysqlConnectMap
- func (this *MysqlConnectMap) CloseContection(spiderName string)
- func (this *MysqlConnectMap) Exec(spiderName, query string, args ...interface{}) (sql.Result, error)
- func (this *MysqlConnectMap) InitConnection(spiderName, url string)
- func (this *MysqlConnectMap) InitMap()
- func (this *MysqlConnectMap) Query(spiderName, query string, args ...interface{}) (*sql.Rows, error)
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()
Click to show internal directories.
Click to hide internal directories.