helpers

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 16 Imported by: 13

Documentation

Index

Constants

View Source
const DefaultConfigPath = "./bobgen.yaml"

Variables

This section is empty.

Functions

func EnumType added in v0.26.0

func EnumType(types drivers.Types, enum string) string

func GetConfigFromFile added in v0.17.2

func GetConfigFromFile[ConstraintExtra, DriverConfig any](configPath, driverConfigKey string) (gen.Config[ConstraintExtra], DriverConfig, plugins.Config, error)

func GetConfigFromProvider added in v0.17.2

func GetConfigFromProvider[ConstraintExtra, DriverConfig any](provider koanf.Provider, driverConfigKey string) (gen.Config[ConstraintExtra], DriverConfig, plugins.Config, error)

func Migrate added in v0.26.0

func Migrate(ctx context.Context, db *sql.DB, dir fs.FS, pattern string) error

func Types added in v0.24.0

func Types() drivers.Types

func Version

func Version() string

Types

type Config added in v0.37.0

type Config struct {
	// Which `database` driver to use (the full module name)
	Driver string `yaml:"driver"`
	// The database connection string
	Dsn string
	// List of tables that will be included. Others are ignored
	Only map[string][]string
	// Folders containing query files
	Queries []string `yaml:"queries"`
	// List of tables that will be should be ignored. Others are included
	Except map[string][]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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