pg

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: 13 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, connConfig types.ConnConfig, onlySchema bool) 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 GetTableSchema

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

func ListTablesInDb

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

func NewDbFromOriginal_DEPRECATED added in v0.5.1

func NewDbFromOriginal_DEPRECATED(originalDbName string, newDbName string) error

DO NOT USE, disconnects all users while creating new db

func RestoreDb

func RestoreDb(connConfig types.ConnConfig, dumpFilePath string, override bool) error

creates db & restores its content from given dump

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