pg

package
v0.4.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDb

func CreateDb(dbname string) error

func DbExists

func DbExists(dbname string) bool

func DeleteDb

func DeleteDb(dbname string) error

func DisconnectAllUsers

func DisconnectAllUsers(dbname string) error

func DumpDb

func DumpDb(outputFilePath string, v *viper.Viper) error

func GetDbSchema

func GetDbSchema(schema, tablename string) (*types.DbSchema, error)

take schema & tablename as "" if need to fetch the whole db schema else specify schema & tablename to get schema for a specific table

func GetExistingDbs

func GetExistingDbs() ([]string, error)

func GetPgConnUriFromViper

func GetPgConnUriFromViper(dbname string) string

func GetTableSchema

func GetTableSchema(schema string, tablename string) (*types.TableSchema, error)

func ListTablesInDb

func ListTablesInDb() ([]types.Table, error)

func NewDbFromOriginal

func NewDbFromOriginal(originalDbName string, newDbName string) error

func PgDumpExists

func PgDumpExists() bool

func RestoreDb

func RestoreDb(dbname string, v *viper.Viper, dumpFilePath string, override bool) error

Types

This section is empty.

Directories

Path Synopsis
not necessary to move ALL SQL queries here
not necessary to move ALL SQL queries here

Jump to

Keyboard shortcuts

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