Documentation
¶
Index ¶
- Constants
- func AppendMultipleStatementsFlag(dataSource string) (string, error)
- func ResetReadTimeout(dataSource string) (string, error)
- func SanitizeDataSource(driverName, dataSource string) (string, error)
- func SetupConnection(logger mlog.LoggerIFace, connType string, dataSource string, ...) (*dbsql.DB, error)
Constants ¶
View Source
const (
DBPingTimeoutSecs = 10
)
Variables ¶
This section is empty.
Functions ¶
func AppendMultipleStatementsFlag ¶
AppendMultipleStatementsFlag attached dsn parameters to MySQL dsn in order to make migrations work.
func ResetReadTimeout ¶
ResetReadTimeout removes the timeout constraint from the MySQL dsn.
func SanitizeDataSource ¶
func SetupConnection ¶
func SetupConnection(logger mlog.LoggerIFace, connType string, dataSource string, settings *model.SqlSettings, attempts int) (*dbsql.DB, error)
SetupConnection sets up the connection to the database and pings it to make sure it's alive. It also applies any database configuration settings that are required.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.