Fix query test

This commit is contained in:
Jinzhu 2018-02-11 13:57:59 +08:00
parent 6450b862e9
commit 3c70f83833
1 changed files with 1 additions and 2 deletions

View File

@ -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"))
} }