postgres

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresServer

type PostgresServer struct {
	Host     string `mapstructure:"host" schema:"host" form:"label:Host,type:text"`
	Port     int    `mapstructure:"port" schema:"port" form:"label:Port,type:number,default:5432"`
	Database string `mapstructure:"database" schema:"database" form:"label:Database,type:text"`
	Username string `mapstructure:"user" schema:"user" form:"label:User,type:text"`
	Password string `mapstructure:"password" schema:"password" form:"label:Password,type:password"`
	Schema   string `mapstructure:"schema" schema:"schema" form:"label:Schema,type:text,default:public"`
	// contains filtered or unexported fields
}

func OpenServer

func OpenServer(settings map[string]any) (*PostgresServer, error)

func (*PostgresServer) Close

func (s *PostgresServer) Close() error

func (*PostgresServer) Columns

func (b *PostgresServer) Columns(table string) ([]models.Column, error)

func (*PostgresServer) CreateColumns

func (s *PostgresServer) CreateColumns(table string, fileName string) error

func (*PostgresServer) CreateEmptyTable

func (s *PostgresServer) CreateEmptyTable(table string) error

func (*PostgresServer) InsertFromNDJsonFile

func (s *PostgresServer) InsertFromNDJsonFile(table string, filePath string) error

func (*PostgresServer) QueryCSV

func (s *PostgresServer) QueryCSV(query string, writer io.Writer) error

func (*PostgresServer) QueryJSON

func (s *PostgresServer) QueryJSON(query string, writer io.Writer) error

func (*PostgresServer) QueryNDJson

func (s *PostgresServer) QueryNDJson(query string, writer io.Writer) error

func (*PostgresServer) Tables

func (b *PostgresServer) Tables() ([]string, error)

Jump to

Keyboard shortcuts

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