Help us shape the future of Go! Take the 2026 Go Developer Survey

database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnExists

func ColumnExists(ctx context.Context, db *sql.DB, driver Driver, tableName, columnName string) (bool, error)

func OpenEnt

func OpenEnt(driver Driver, source string) (*ent.Client, error)

func OpenSQL

func OpenSQL(driver Driver, source string) (*sql.DB, error)

func TableExists

func TableExists(ctx context.Context, db *sql.DB, driver Driver, tableName string) (bool, error)

Types

type Driver

type Driver string
const (
	MySQL    Driver = "mysql"
	Postgres Driver = "postgres"
)

func NormalizeDriver

func NormalizeDriver(value string) (Driver, error)

func (Driver) String

func (d Driver) String() string

Jump to

Keyboard shortcuts

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