Documentation ¶
Index ¶
- func ExecTxQuery(query string, tx *sql.Tx, args ...interface{}) (string, error)
- func GetMYSQLConnection(connectionName string) (*dbr.Connection, error)
- func Init(tomlFilepath string, defaultHostName string) (map[string]*dbr.Connection, error)
- func InitConnection(connectionDetails MySQLConnection) (*dbr.Connection, error)
- func InitUsingJSON(configs []MySQLConnection) error
- func SelectTxQuery(query string, tx *sql.Tx, args ...interface{}) (*gjson.Result, error)
- type MySQLConnection
- type MySQLDAO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecTxQuery ¶
ExecTxQuery - ExecTxQuery
func GetMYSQLConnection ¶
GetMYSQLConnection -
func Init ¶
Init initializes MYSQL Connections for given toml file
func InitConnection ¶
func InitConnection(connectionDetails MySQLConnection) (*dbr.Connection, error)
InitConnection - InitConnection
func InitUsingJSON ¶
func InitUsingJSON(configs []MySQLConnection) error
InitUsingJSON - InitUsingJSON
Types ¶
type MySQLConnection ¶
type MySQLConnection struct { HostName string `json:"hostName" bson:"hostName"` Server string `json:"server" bson:"server"` Port int `json:"port" bson:"port"` Username string `json:"username" bson:"username"` Password string `json:"password" bson:"password"` Protocol string `json:"protocol" bson:"protocol"` Database string `json:"database" bson:"database"` Parameters []param `json:"params" bson:"params"` MaxIdleConns int `json:"maxIdleConns" bson:"maxIdleConns"` MaxOpenConns int `json:"maxOpenConns" bson:"maxOpenConns"` ConnMaxLifetime time.Duration `json:"connMaxLifetime" bson:"connMaxLifetime"` IsDefault bool `json:"isDefault" bson:"isDefault"` IsDisabled bool `json:"isDisabled" bson:"isDisabled"` }
MySQLConnection - MySQLConnection
Click to show internal directories.
Click to hide internal directories.