db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(connectionString string) (*sql.DB, error)

Connect establishes a database connection from an oslo.db-style MySQL URL.

Supported input formats:

  • mysql://user:password@host:port/database
  • mysql+pymysql://user:password@host:port/database
  • mysql+mysqldb://user:password@host:port/database
  • mysql+mysqlconnector://user:password@host:port/database

func ParseOsloDBConnectionString

func ParseOsloDBConnectionString(connectionString string) (string, error)

ParseOsloDBConnectionString converts oslo.db/SQLAlchemy-style MySQL connection strings to Go MySQL driver DSN format.

Supported input formats:

  • mysql://user:password@host:port/database
  • mysql+pymysql://user:password@host:port/database
  • mysql+mysqldb://user:password@host:port/database
  • mysql+mysqlconnector://user:password@host:port/database

Output format (Go MySQL DSN):

  • user:password@tcp(host:port)/database?parseTime=true

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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