destructive

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	Options
}

Analyzer checks for destructive changes.

func New

func New(opts Options) *Analyzer

New creates a new destructive changes Analyzer with the given options.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(_ context.Context, p *sqlcheck.Pass) error

Analyze implements sqlcheck.Analyzer.

type Options

type Options struct {
	// DropSchema indicates if the analyzer should check for schema dropping.
	DropSchema *bool `spec:"drop_schema,omitempty"`

	// DropTable indicates if the analyzer should check for table dropping.
	DropTable *bool `spec:"drop_schema,omitempty"`

	// DropColumn indicates if the analyzer should check for column dropping.
	DropColumn *bool `spec:"drop_column,omitempty"`

	// Allow drivers to extend the configuration.
	schemahcl.DefaultExtension
}

Options defines the configuration options for the destructive changes checker.

Jump to

Keyboard shortcuts

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