parseutil

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: 3 Imported by: 0

Documentation

Overview

Package parseutil exposes shared functions used by the different parsers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchStmtAfter added in v0.10.0

func MatchStmtAfter(f migrate.File, pos int, p func(*migrate.Stmt) (bool, error)) (bool, error)

MatchStmtAfter reports if the file contains any statement that matches the predicate after the given position.

func MatchStmtBefore

func MatchStmtBefore(f migrate.File, pos int, p func(*migrate.Stmt) (bool, error)) (bool, error)

MatchStmtBefore reports if the file contains any statement that matches the predicate before the given position.

func RenameColumn

func RenameColumn(modify *schema.ModifyTable, r *Rename)

RenameColumn patches DROP/ADD column commands to RENAME.

func RenameIndex

func RenameIndex(modify *schema.ModifyTable, r *Rename)

RenameIndex patches DROP/ADD index commands to RENAME.

func RenameTable

func RenameTable(changes schema.Changes, r *Rename) schema.Changes

RenameTable patches DROP/ADD table commands to RENAME.

Types

type Rename

type Rename struct {
	From, To string
}

Rename describes rename of a resource.

Jump to

Keyboard shortcuts

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