utils

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// DefaultMigrationFolder ...
	DefaultMigrationFolder = "migrations/"
	// DefaultMigrationUpSuffix ...
	DefaultMigrationUpSuffix = ".up.sql"
	// DefaultMigrationDownSuffix ...
	DefaultMigrationDownSuffix = ".down.sql"
	// DefaultMigrationTable ...
	DefaultMigrationTable = "schema_migrations"
)

Variables

View Source
var (
	// PathDoesNotExistErr ...
	PathDoesNotExistErr = errors.Errorf("path does not exist")
)

Functions

func ContainStr

func ContainStr(ss []string, s string) bool

ContainStr ...

func EscapeSqlName

func EscapeSqlName(isPostgres bool, name string) string

EscapeSqlName ...

func EscapeSqlNames

func EscapeSqlNames(isPostgres bool, names []string) []string

EscapeSqlNames ...

func MigrationFileName

func MigrationFileName(name string) string

MigrationFileName ...

func ReadPath

func ReadPath(path string, suffix string) ([]string, error)

ReadPath ...

func SlideStrEqual

func SlideStrEqual(a, b []string) bool

SlideStrEqual ...

func ToSnakeCase

func ToSnakeCase(input string) string

ToSnakeCase ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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