Documentation ¶
Overview ¶
Package postgres includes implementation of Provider interface, as well as all necessary helper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgProvider ¶
type PgProvider struct {
// contains filtered or unexported fields
}
PgProvider struct contains config and is the implementation of Providers interface for PostgreSQL database.
func New ¶
func New(configPath string) (PgProvider, error)
New reads provided config and creates new Postgres Provider.
func (PgProvider) DateFormat ¶
func (pg PgProvider) DateFormat() string
DateFormat is interface function.
func (PgProvider) DateTimeFormat ¶
func (pg PgProvider) DateTimeFormat() string
DateTimeFormat is interface function.
func (PgProvider) GetTableDescription ¶
func (pg PgProvider) GetTableDescription(name string) (dsc []providers.Describe, err error)
GetTableDescription retrieves basic table description from database. Using describe.sql it retrieves info about every column of table.
func (*PgProvider) Initialize ¶
func (pg *PgProvider) Initialize(configPath string) (err error)
Initialize reads config and returns the provider with configuration read from the config. By default it is called by New function, but can be used standalone.
func (PgProvider) ProviderName ¶
func (pg PgProvider) ProviderName() string
ProviderName is interface function.