mysql

package
v0.0.0-...-4474319 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(destDir string, dbConn DBConnection, generatorTemplate ...template.Template) error

Generate generates jet files at destination dir from database connection details

func GenerateDB

func GenerateDB(db *sql.DB, dbName, destDir string, templates ...template.Template) error

GenerateDB generates jet files using the provided *sql.DB

func GenerateDSN

func GenerateDSN(dsn, destDir string, templates ...template.Template) error

GenerateDSN opens connection via DSN string and does everything what Generate does.

Types

type DBConnection

type DBConnection struct {
	Host string
	Port int
	User string
	// #nosec G117 -- password is used only for the local development
	Password string
	Params   string

	DBName string
}

DBConnection contains MySQL connection details

Jump to

Keyboard shortcuts

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