Qrm refactor
- Allow custom types Scan method to read values returned by the driver rather then the value from intermediate Null types. Scan to intermidiate Null types removed. - Better error handling
This commit is contained in:
parent
555ec293fb
commit
0d418890ab
11 changed files with 459 additions and 574 deletions
|
|
@ -31,7 +31,7 @@ func TestMain(m *testing.M) {
|
|||
|
||||
setTestRoot()
|
||||
|
||||
for _, driverName := range []string{"postgres", "pgx"} {
|
||||
for _, driverName := range []string{"pgx", "postgres"} {
|
||||
fmt.Printf("\nRunning postgres tests for '%s' driver\n", driverName)
|
||||
|
||||
func() {
|
||||
|
|
@ -81,8 +81,16 @@ func requireLogged(t *testing.T, statement postgres.Statement) {
|
|||
}
|
||||
|
||||
func skipForPgxDriver(t *testing.T) {
|
||||
switch db.Driver().(type) {
|
||||
case *stdlib.Driver:
|
||||
if isPgxDriver() {
|
||||
t.SkipNow()
|
||||
}
|
||||
}
|
||||
|
||||
func isPgxDriver() bool {
|
||||
switch db.Driver().(type) {
|
||||
case *stdlib.Driver:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue