mysql

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AccountsTableSchema = `` /* 858-byte string literal not displayed */

AccountsTableSchema is the SQL schema for the accounts table

Variables

This section is empty.

Functions

func CreateAccountsTable

func CreateAccountsTable(db database.Database) error

CreateAccountsTable creates the accounts table

func New

func New(cfg *Config) (database.Database, error)

New creates a new MySQL/MariaDB database connection

Types

type Config

type Config struct {
	Host      string
	Port      int
	User      string
	Password  string
	Database  string
	Charset   string
	ParseTime bool
	Loc       string // Location for time.Time
	TLS       string // TLS configuration: true, false, skip-verify, preferred
	Timeout   string // Connection timeout
}

Config represents MySQL/MariaDB-specific configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a Config with sensible defaults

Jump to

Keyboard shortcuts

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