コード例 #1
0
ファイル: pgsql.go プロジェクト: sedzinreri/pgsql.go
// Reset closes the connection to the server and attempts to re-establish a new
// connection using the parameters passed in the original Connect call.
func (c *Conn) Reset() os.Error {
	if c == nil || c.db == nil {
		return os.NewError("nil postgresql connection")
	}
	C.PQreset(c.db)
	if C.PQstatus(c.db) != C.CONNECTION_OK {
		return connError(c.db)
	}
	return nil
}
コード例 #2
0
ファイル: go-harbour.go プロジェクト: hernad/go-harbour
func LoadHbPostgresqlC() {
	var conn *C.PGconn
	C.PQreset(conn)
}