import "github.com/bmizerany/pq"
const (
Efatal = "FATAL"
Epanic = "PANIC"
Ewarning = "WARNING"
Enotice = "NOTICE"
Edebug = "DEBUG"
Einfo = "INFO"
Elog = "LOG"
)
var (
ErrSSLNotSupported = errors.New("pq: SSL is not enabled on the server")
ErrNotSupported = errors.New("pq: invalid command")
)
func Open(name string) (_ driver.Conn, err error)
func ParseURL(url string) (string, error)
ParseURL converts url to a connection string for driver.Open. Example:
"postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full"
converts to:
"user=bob password=secret host=1.2.3.4 port=5432 dbname=mydb sslmode=verify-full"
A minimal example:
"postgres://"
This will be blank, causing driver.Open to use all of the defaults
type Error error
type NullTime struct {
Time time.Time
Valid bool // Valid is true if Time is not NULL
}
func (nt *NullTime) Scan(value interface{}) error
Scan implements the Scanner interface.
func (nt NullTime) Value() (driver.Value, error)
Value implements the driver Valuer interface.
type PGError interface {
Error() string
Fatal() bool
Get(k byte) (v string)
}
type SimplePGError struct {
// contains filtered or unexported fields
}
func (err *SimplePGError) Error() string
func (err *SimplePGError) Fatal() bool
func (err *SimplePGError) Get(k byte) (v string)
type Values map[string]string
func (vs Values) Get(k string) (v string)
func (vs Values) Set(k, v string)