driver

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPostgres

func RunPostgres(ctx context.Context, state *gen.State, config Config) error

func RunSQLite

func RunSQLite(ctx context.Context, state *gen.State, config Config) error

Types

type Config

type Config struct {
	// What dialect to generate with
	// psql | mysql | sqlite
	Dialect string
	// Where the SQL files are
	Dir string
	// The database schemas to generate models for
	Schemas []string
	// The name of this schema will not be included in the generated models
	// a context value can then be used to set the schema at runtime
	// useful for multi-tenant setups
	SharedSchema string `yaml:"shared_schema"`
	// List of tables that will be included. Others are ignored
	Only map[string][]string
	// List of tables that will be should be ignored. Others are included
	Except map[string][]string
	// How many tables to fetch in parallel
	Concurrency int
	// Which UUID package to use (gofrs or google)
	UUIDPkg string `yaml:"uuid_pkg"`

	Output    string
	Pkgname   string
	NoFactory bool `yaml:"no_factory"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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