mysql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mysql links the MySQL driver (go-sql-driver/mysql) for the ORM: blank-import it to Connect to "mysql". Connect reads the DSN as orm.MySQLDSN sets it: parseTime on, which the ORM's time fields need, and utf8mb4 in the server's default collation. It also teaches the ORM the driver's errors (deadlocks to retry, dropped connections) and how to put orm.Credentials into a DSN.

import _ "github.com/vuka-lang/orm/mysql"

db, err := orm.Connect("mysql", "user:pass@tcp(localhost:3306)/shop")

Jump to

Keyboard shortcuts

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