sqlparse

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, f Parser)

Register a fixer with the given name.

Types

type Parser added in v0.7.1

type Parser interface {
	// FixChange fixes the changes according to the given statement.
	FixChange(d migrate.Driver, stmt string, changes schema.Changes) (schema.Changes, error)

	// ColumnFilledBefore checks if the column was filled with values before the given position
	// in the file. For example:
	//
	//	UPDATE <table> SET <column> = <value>
	//	UPDATE <table> SET <column> = <value> WHERE <column> IS NULL
	//
	ColumnFilledBefore(migrate.File, *schema.Table, *schema.Column, int) (bool, error)
}

A Parser represents an SQL file parser used to fix, search and enrich schema.Changes.

func ParserFor added in v0.7.1

func ParserFor(name string) Parser

ParserFor returns a ChangesFixer for the given driver.

Directories

Path Synopsis
Package parseutil exposes shared functions used by the different parsers.
Package parseutil exposes shared functions used by the different parsers.

Jump to

Keyboard shortcuts

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