libUtils

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CwdIsProject added in v0.5.1

func CwdIsProject() (string, bool, error)

func EnsureDirExists

func EnsureDirExists(dirName string) (bool, error)

returns "(true, nil)" if dir was created, else returns "(false, ...)"

func Exists

func Exists(path string) bool

func FindConfigDirPath

func FindConfigDirPath() (string, error)

func FindConfigFilePath

func FindConfigFilePath() (string, error)

func FindTmpDirPath

func FindTmpDirPath() (string, error)

func GenerateMigrationId

func GenerateMigrationId(migrationsDirPath string, title string) (string, error)

returns "00069__title" or "00069"

func GetAbsolutePathFor

func GetAbsolutePathFor(relativePath string) (string, error)

func GetConnConfigFromUri added in v0.5.1

func GetConnConfigFromUri(uri string) (types.ConnConfig, error)

func GetConnConfigFromViper added in v0.5.1

func GetConnConfigFromViper(v *viper.Viper) (types.ConnConfig, error)

func GetDbConfigOriginKey added in v0.5.1

func GetDbConfigOriginKey(originName string) string

func GetDriverDumpDir added in v0.5.1

func GetDriverDumpDir(configFilePath string, driver string) string

func GetDumpFileName added in v0.5.1

func GetDumpFileName(dbname string) string

func GetGlobalConfigPath added in v0.5.1

func GetGlobalConfigPath() string

func GetGlobalDirPath added in v0.5.1

func GetGlobalDirPath() string

func GetLocalConfigPath added in v0.5.1

func GetLocalConfigPath() string

func GetMigrationsDir

func GetMigrationsDir(configDirPath, dbname string) string

func GetSQLStmts added in v0.5.1

func GetSQLStmts(sqlStr string) []string

func GetTableFromId

func GetTableFromId(tableid string) (string, string)

returns (schemaname, tablename) after taking in "schemaname.tablename"

func GetTableId

func GetTableId(schemaname, tablename string) string

func IsStmtBegin added in v0.5.1

func IsStmtBegin(line string) bool

func IsStmtEnd added in v0.5.1

func IsStmtEnd(line string) bool

func OpenFileInEditor

func OpenFileInEditor(filePath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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