mirror of https://github.com/go-gorm/gorm.git
Fix broken test for postgres
This commit is contained in:
parent
73c47b90fe
commit
aa8bc02c11
|
@ -36,7 +36,7 @@ func Create(scope *Scope) {
|
|||
|
||||
returningKey := "*"
|
||||
if scope.PrimaryKey() != "" {
|
||||
returningKey = scope.PrimaryKey()
|
||||
returningKey = scope.Quote(scope.PrimaryKey())
|
||||
}
|
||||
|
||||
if len(columns) == 0 {
|
||||
|
|
|
@ -4,8 +4,9 @@ import (
|
|||
"database/sql"
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/lib/pq/hstore"
|
||||
"reflect"
|
||||
|
||||
"github.com/lib/pq/hstore"
|
||||
)
|
||||
|
||||
type postgres struct {
|
||||
|
@ -66,7 +67,7 @@ func (s *postgres) PrimaryKeyTag(value reflect.Value, size int) string {
|
|||
}
|
||||
|
||||
func (s *postgres) ReturningStr(tableName, key string) string {
|
||||
return fmt.Sprintf("RETURNING %v.%v", s.Quote(tableName), s.Quote(key))
|
||||
return fmt.Sprintf("RETURNING %v.%v", s.Quote(tableName), key)
|
||||
}
|
||||
|
||||
func (s *postgres) SelectFromDummyTable() string {
|
||||
|
|
Loading…
Reference in New Issue