Documentation
¶
Index ¶
- Constants
- type Client
- type Config
- type PgxClient
- func (client *PgxClient) Close() error
- func (client *PgxClient) CreateDatabase(name string) error
- func (client *PgxClient) DropDatabase(name string) error
- func (client *PgxClient) Open() error
- func (client *PgxClient) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (client *PgxClient) Use(name string) error
Constants ¶
View Source
const (
DefaultPort = 5432
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a client for PostgreSQL server.
func NewDefaultClient ¶
func NewDefaultClient() Client
NewDefaultClient returns a default client for PostgreSQL server.
type Config ¶
Config stores server configuration parammeters.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a default configuration instance.
func (*Config) SetDatabase ¶
SetDatabase sets a host database.
type PgxClient ¶
type PgxClient struct { *Config *pgx.Conn }
PgxClient represents a client for PostgreSQL server.
func (*PgxClient) CreateDatabase ¶
CreateDatabase creates a specified database.
func (*PgxClient) DropDatabase ¶
DropDatabase dtops a specified database.
Click to show internal directories.
Click to hide internal directories.