Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func ExecAffectingOneRow(stmt *sql.Stmt, args ...interface{}) error
- func FloatToNull(i float64) sql.NullFloat64
- func GetConnection() *sql.DB
- func GetPsqlConnection(config DBConfig) error
- func IntToNull(i int64) sql.NullInt64
- func ParseDateToTime(s string) pq.NullTime
- func StringToNull(s string) sql.NullString
- func TimeToNull(t time.Time) pq.NullTime
- type DBConfig
- type RowScanner
Constants ¶
View Source
const Postgres = "postgres"
Variables ¶
View Source
var ErrExpectedOneRow = errors.New("expected 1 row")
ErrExpectedOneRow is used for indicate that expected 1 row
Functions ¶
func ExecAffectingOneRow ¶ added in v1.1.0
func FloatToNull ¶
func FloatToNull(i float64) sql.NullFloat64
FloatToNull returns nil if date has zero value
func GetPsqlConnection ¶
func ParseDateToTime ¶
ParseDateToTime returns nil if date has zero value
func StringToNull ¶
func StringToNull(s string) sql.NullString
StringToNull returns nil if date has zero value
Types ¶
type RowScanner ¶
type RowScanner interface {
Scan(dest ...interface{}) error
}
Click to show internal directories.
Click to hide internal directories.