imdatabase

package
v0.0.0-...-2770a49 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseLog

func DatabaseLog(messages ...interface{})

日志文档

Types

type ImDb

type ImDb struct {
	Db *sql.DB
}

func (*ImDb) AddActDialog

func (b *ImDb) AddActDialog(dialogid uint64) error

********************插入act_dialog*****************

func (*ImDb) AddDialog

func (b *ImDb) AddDialog(dialogid uint64, uids []uint64) error

********************插入dialog*****************

func (*ImDb) AddMessage

func (b *ImDb) AddMessage(uid uint64, dialogid uint64, msgType uint32, information string, messageTimestamp string) error

********************插入message*****************

func (*ImDb) AddOutlineMsg

func (b *ImDb) AddOutlineMsg(uid uint64, types uint32, packet []byte, messageTimestamp string) error

********************插入OutLineMessage*****************

func (*ImDb) AddUser

func (b *ImDb) AddUser(uid uint64) error

********************插入user*****************

func (*ImDb) CloseDb

func (b *ImDb) CloseDb()

**************关闭数据库*********

func (*ImDb) ConnectDb

func (b *ImDb) ConnectDb() error

**************连接数据库*********

func (*ImDb) CreateTables

func (b *ImDb) CreateTables() error

******************建表 **************

func (*ImDb) DeleteDbTable

func (b *ImDb) DeleteDbTable(deletePrepareString string, parameter ...interface{}) error

删除数据表信息,deleteString为prepare语句,参数在parameter 例子: DeleteDbTable("delete from act_dialog where dialog_id=?",1234)

func (*ImDb) UpdateTable

func (b *ImDb) UpdateTable(updatePrepareString string, parameter ...interface{}) error

更新数据,输入update的prepare语句,parameter为参数 例子: UpdateTable("update dialog set timestamp=? where dialog_id=? and uid=?","0000-00-00 00:00:00",111222,333)

Jump to

Keyboard shortcuts

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