sql

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	DBPingTimeoutSecs = 10
)

Variables

This section is empty.

Functions

func AppendMultipleStatementsFlag

func AppendMultipleStatementsFlag(dataSource string) (string, error)

AppendMultipleStatementsFlag attached dsn parameters to MySQL dsn in order to make migrations work.

func ResetReadTimeout

func ResetReadTimeout(dataSource string) (string, error)

ResetReadTimeout removes the timeout constraint from the MySQL dsn.

func SanitizeDataSource

func SanitizeDataSource(driverName, dataSource string) (string, error)

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.

Jump to

Keyboard shortcuts

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