parseutil

package
v0.0.0-...-13ce33a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 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

func MatchStmtAfter(stmts []*migrate.Stmt, 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(stmts []*migrate.Stmt, 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