database

package
v0.0.0-...-0f2857b Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB

	Dialect dialect.Dialect
}

func Open

func Open(driver Driver, dsn string) (*DB, error)

type Driver

type Driver string
const (
	DriverPostgres Driver = "postgres"
	DriverMySQL    Driver = "mysql"
)

func (Driver) Dialect

func (d Driver) Dialect() (dialect.Dialect, error)

Dialect returns the SQL dialect that matches the driver, or an error if the driver is unknown.

func (Driver) Introspector

func (d Driver) Introspector() (schema.Introspector, error)

Introspector returns the schema introspector that matches the driver, or an error if the driver is unknown.

Jump to

Keyboard shortcuts

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