Discover Packages
github.com/cwbriscoe/goutil
db
package
Version:
v0.1.4
Opens a new window with list of versions in this module.
Published: Nov 26, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 4
Opens a new window with list of known importers.
Documentation
Documentation
¶
Copyright 2023 Christopher Briscoe. All rights reserved.
Copyright 2023 Christopher Briscoe. All rights reserved.
NewPgConn connects to a postgres db and returns a connection
NewPgPool connects to a postgres db and returns a pool of connections
Batch holds sql to be executed at once
NewBatch returns a new Batch object
Exec executes all of the sql in the batch and returns the first error
Queue adds an sql statement to the batch
type Config struct {
Host string `json:"host"`
Port string `json:"port"`
Name string `json:"name"`
User string `json:"user"`
Pass string `json:"pass"`
}
Config stores postgres database connection info
Source Files
¶
Click to show internal directories.
Click to hide internal directories.