mirror of https://github.com/go-gorm/gorm.git
Fix query test
This commit is contained in:
parent
6450b862e9
commit
3c70f83833
|
@ -2,7 +2,6 @@ package gorm_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
|
@ -683,7 +682,7 @@ func TestPluckWithSelect(t *testing.T) {
|
||||||
combineUserAgeSQL = fmt.Sprintf("concat(%v, %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age"))
|
combineUserAgeSQL = fmt.Sprintf("concat(%v, %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age"))
|
||||||
)
|
)
|
||||||
|
|
||||||
if dialect := os.Getenv("GORM_DIALECT"); dialect == "sqlite" {
|
if dialect := DB.Dialect().GetName(); dialect == "sqlite3" {
|
||||||
combineUserAgeSQL = fmt.Sprintf("(%v || %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age"))
|
combineUserAgeSQL = fmt.Sprintf("(%v || %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue