utils

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ORDER_ASC  = iota
	ORDER_DESC = iota
)

Variables

This section is empty.

Functions

func GetCurrentMigrationNumberFromEntry added in v0.0.6

func GetCurrentMigrationNumberFromEntry(migrationEntry *entities.MigrationEntry) int

This is more of a current state / current migration number according to last applied migration entry if last migration was down, then current state will be one below that entry if last migration was up, then current state will be that entry

func GetNextFileNames

func GetNextFileNames(nextNumber int, numToGenerate int) []string

func GetNextMigrationNumber added in v0.0.6

func GetNextMigrationNumber(migrationNumbers []int) int

func GetNumberFromArgs

func GetNumberFromArgs(args []string, defaultValue int) int

func MigrationNumberFromString added in v0.0.6

func MigrationNumberFromString(baseFileName string) (int, error)

func NextMigrationNumbersForBackwardMigration added in v0.0.6

func NextMigrationNumbersForBackwardMigration(migrationNumbers []int, seekNumber int, seekLength int) []int

func NextMigrationNumbersForForwardMigration added in v0.0.6

func NextMigrationNumbersForForwardMigration(migrationNumbers []int, seekNumber int, seekLength int) []int

func ParseNumberToString added in v0.2.1

func ParseNumberToString(migrationNumbers []int) []string

func ParseStringsToNumbers added in v0.2.5

func ParseStringsToNumbers(baseFileNames []string) ([]int, error)

func PrintContentWithEndLine added in v0.0.2

func PrintContentWithEndLine(content string)

func SortNumbers added in v0.0.2

func SortNumbers(migrationNumber []int, order int) []int

Types

This section is empty.

Jump to

Keyboard shortcuts

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