cmd

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const QueryFlagSqlcVetDisable = "@sqlc-vet-disable"
View Source
const RuleDbPrepare = "sqlc/db-prepare"

Variables

View Source
var ErrFailedChecks = errors.New("failed checks")
View Source
var ErrPluginProcessDisabled = errors.New("plugin: process-based plugins disabled via SQLCDEBUG=processplugins=0")

Functions

func Diff

func Diff(ctx context.Context, e Env, dir, name string, stderr io.Writer) error

func Do

func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int

Do runs the command logic.

func Generate

func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer) (map[string]string, error)

func NewCmdVet

func NewCmdVet() *cobra.Command

func Vet

func Vet(ctx context.Context, e Env, dir, filename string, stderr io.Writer) error

Types

type Env

type Env struct {
	DryRun     bool
	Debug      opts.Debug
	Remote     bool
	NoRemote   bool
	NoDatabase bool
}

func ParseEnv

func ParseEnv(c *cobra.Command) Env

func (*Env) Validate

func (e *Env) Validate(cfg *config.Config) error

Jump to

Keyboard shortcuts

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