Documentation ¶
Index ¶
- type PostgresServer
- func (s *PostgresServer) Close() error
- func (b *PostgresServer) Columns(table string) ([]models.Column, error)
- func (s *PostgresServer) CreateColumns(table string, fileName string) error
- func (s *PostgresServer) CreateEmptyTable(table string) error
- func (s *PostgresServer) InsertFromNDJsonFile(table string, filePath string) error
- func (s *PostgresServer) QueryCSV(query string, writer io.Writer) error
- func (s *PostgresServer) QueryJSON(query string, writer io.Writer) error
- func (s *PostgresServer) QueryNDJson(query string, writer io.Writer) error
- func (b *PostgresServer) Tables() ([]string, error)
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)
Click to show internal directories.
Click to hide internal directories.