Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Close() bool
- func (c *Connection) Connect() error
- func (c *Connection) Exec(sqlstr string, args ...interface{}) (sql.Result, error)
- func (c *Connection) GetConnection() error
- func (c *Connection) IsConnected() bool
- func (c *Connection) IsValid() bool
- func (c *Connection) Query(sqlstr string, args ...interface{}) (*sql.Rows, error)
- func (c *Connection) SetConnStr(opts config.SQLConnOpt)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection 数据库连接
func (*Connection) Exec ¶
func (c *Connection) Exec(sqlstr string, args ...interface{}) (sql.Result, error)
Exec 执行语句
func (*Connection) Query ¶
func (c *Connection) Query(sqlstr string, args ...interface{}) (*sql.Rows, error)
Query 查询语句
func (*Connection) SetConnStr ¶
func (c *Connection) SetConnStr(opts config.SQLConnOpt)
SetConnStr 设置数据库连接字符串
Click to show internal directories.
Click to hide internal directories.