Changes: * I add postgres_databaseutils_test.go for containing all utilities for mocking the database. * I put appName as a required parameter passed to the New() since it is needed to form the namespace column name. * I add GetMaxInterval() since it might be needed by the consumer and the test. * I move the SQL string package variables directly into the function that need it so we could avoid maintenance nightmare in the future.
7 lines
103 B
Go
7 lines
103 B
Go
package postgres
|
|
|
|
import "database/sql"
|
|
|
|
func (c *Checkpoint) SetConn(conn *sql.DB) {
|
|
c.conn = conn
|
|
}
|