Documentation ¶
Overview ¶
Connect and execute patch
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct { SqlxDb *sqlx.DB SqlxDbCtrl *osqlx.DbController // contains filtered or unexported fields }
Represents the connection information to database
func NewDatabaseConfig ¶
func NewDatabaseConfig(driverName string, dsn string) (dbConfig *DatabaseConfig, err error)
Initialize a new configuration to database This function also tries to ping the database
func (*DatabaseConfig) Close ¶
func (databaseConfig *DatabaseConfig) Close() error
Close the db resource hold by the DatabaseConfig
func (*DatabaseConfig) Execute ¶
func (databaseConfig *DatabaseConfig) Execute( dbCallback func(db *dbsql.DB) error, ) (err error)
Execute a callback which accepts "database/sql.DB" object
func (*DatabaseConfig) GetDatabaseName ¶
func (c *DatabaseConfig) GetDatabaseName() string
Click to show internal directories.
Click to hide internal directories.