remmove jinzhu references
This commit is contained in:
parent
a6c2b1d17d
commit
fa019508b0
@ -7,7 +7,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBelongsTo(t *testing.T) {
|
func TestBelongsTo(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package gorm_test
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CustomizeColumn struct {
|
type CustomizeColumn struct {
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
// Importing mssql driver package only in dialect file, otherwide not needed
|
// Importing mssql driver package only in dialect file, otherwide not needed
|
||||||
_ "github.com/denisenkom/go-mssqldb"
|
_ "github.com/denisenkom/go-mssqldb"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setIdentityInsert(scope *gorm.Scope) {
|
func setIdentityInsert(scope *gorm.Scope) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestErrorsCanBeUsedOutsideGorm(t *testing.T) {
|
func TestErrorsCanBeUsedOutsideGorm(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CalculateField struct {
|
type CalculateField struct {
|
||||||
|
@ -178,7 +178,7 @@ func (s JoinTableHandler) JoinWith(handler JoinTableHandlerInterface, db *DB, so
|
|||||||
joinConditions = append(joinConditions, fmt.Sprintf("%v.%v = %v.%v", quotedTableName, scope.Quote(foreignKey.DBName), destinationTableName, scope.Quote(foreignKey.AssociationDBName)))
|
joinConditions = append(joinConditions, fmt.Sprintf("%v.%v = %v.%v", quotedTableName, scope.Quote(foreignKey.DBName), destinationTableName, scope.Quote(foreignKey.AssociationDBName)))
|
||||||
}
|
}
|
||||||
joinConditions = append(joinConditions, s.ArbitraryJoinConditions...)
|
joinConditions = append(joinConditions, s.ArbitraryJoinConditions...)
|
||||||
|
fmt.Println(joinConditions)
|
||||||
var foreignDBNames []string
|
var foreignDBNames []string
|
||||||
var foreignFieldNames []string
|
var foreignFieldNames []string
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Person struct {
|
type Person struct {
|
||||||
|
8
main.go
8
main.go
@ -51,10 +51,10 @@ const (
|
|||||||
// db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local")
|
// db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local")
|
||||||
// }
|
// }
|
||||||
// GORM has wrapped some drivers, for easier to remember driver's import path, so you could import the mysql driver with
|
// GORM has wrapped some drivers, for easier to remember driver's import path, so you could import the mysql driver with
|
||||||
// import _ "github.com/jinzhu/gorm/dialects/mysql"
|
// import _ "github.com/DMXRoid/gorm/dialects/mysql"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/postgres"
|
// // import _ "github.com/DMXRoid/gorm/dialects/postgres"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/sqlite"
|
// // import _ "github.com/DMXRoid/gorm/dialects/sqlite"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/mssql"
|
// // import _ "github.com/DMXRoid/gorm/dialects/mssql"
|
||||||
func Open(dialect string, args ...interface{}) (db *DB, err error) {
|
func Open(dialect string, args ...interface{}) (db *DB, err error) {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
err = errors.New("invalid database source")
|
err = errors.New("invalid database source")
|
||||||
|
10
main_test.go
10
main_test.go
@ -15,11 +15,11 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/erikstmartin/go-testdb"
|
"github.com/erikstmartin/go-testdb"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
_ "github.com/jinzhu/gorm/dialects/mssql"
|
_ "github.com/DMXRoid/gorm/dialects/mssql"
|
||||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
_ "github.com/DMXRoid/gorm/dialects/mysql"
|
||||||
"github.com/jinzhu/gorm/dialects/postgres"
|
"github.com/DMXRoid/gorm/dialects/postgres"
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/DMXRoid/gorm/dialects/sqlite"
|
||||||
"github.com/jinzhu/now"
|
"github.com/jinzhu/now"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
|
@ -3,7 +3,7 @@ package gorm_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTheNamingStrategy(t *testing.T) {
|
func TestTheNamingStrategy(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPreloadUser(name string) *User {
|
func getPreloadUser(name string) *User {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestScannableSlices(t *testing.T) {
|
func TestScannableSlices(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NameIn1And2(d *gorm.DB) *gorm.DB {
|
func NameIn1And2(d *gorm.DB) *gorm.DB {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/DMXRoid/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUpdate(t *testing.T) {
|
func TestUpdate(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user