Rename package name
This commit is contained in:
		
							parent
							
								
									5ecbf25b22
								
							
						
					
					
						commit
						e986371a42
					
				| @ -2,14 +2,14 @@ | |||||||
| 
 | 
 | ||||||
| The fantastic ORM library for Golang, aims to be developer friendly. | The fantastic ORM library for Golang, aims to be developer friendly. | ||||||
| 
 | 
 | ||||||
| [](https://goreportcard.com/report/github.com/jinzhu/gorm) | [](https://goreportcard.com/report/gorm.io/gorm) | ||||||
| [](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b) | [](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b) | ||||||
| [](https://codecov.io/gh/jinzhu/gorm) | [](https://codecov.io/gh/jinzhu/gorm) | ||||||
| [](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | [](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||||||
| [](https://opencollective.com/gorm) | [](https://opencollective.com/gorm) | ||||||
| [](https://opencollective.com/gorm) | [](https://opencollective.com/gorm) | ||||||
| [](https://opensource.org/licenses/MIT) | [](https://opensource.org/licenses/MIT) | ||||||
| [](https://godoc.org/github.com/jinzhu/gorm) | [](https://godoc.org/gorm.io/gorm) | ||||||
| 
 | 
 | ||||||
| ## Overview | ## Overview | ||||||
| 
 | 
 | ||||||
| @ -39,3 +39,4 @@ The fantastic ORM library for Golang, aims to be developer friendly. | |||||||
| © Jinzhu, 2013~time.Now | © Jinzhu, 2013~time.Now | ||||||
| 
 | 
 | ||||||
| Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License) | Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License) | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -6,9 +6,9 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Association Mode contains some helper methods to handle relationship things easily.
 | // Association Mode contains some helper methods to handle relationship things easily.
 | ||||||
|  | |||||||
| @ -7,9 +7,9 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func initializeCallbacks(db *DB) *callbacks { | func initializeCallbacks(db *DB) *callbacks { | ||||||
|  | |||||||
| @ -3,10 +3,10 @@ package callbacks | |||||||
| import ( | import ( | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func SaveBeforeAssociations(db *gorm.DB) { | func SaveBeforeAssociations(db *gorm.DB) { | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| package callbacks | package callbacks | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Config struct { | type Config struct { | ||||||
|  | |||||||
| @ -3,9 +3,9 @@ package callbacks | |||||||
| import ( | import ( | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func BeforeCreate(db *gorm.DB) { | func BeforeCreate(db *gorm.DB) { | ||||||
|  | |||||||
| @ -3,9 +3,9 @@ package callbacks | |||||||
| import ( | import ( | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func BeforeDelete(db *gorm.DB) { | func BeforeDelete(db *gorm.DB) { | ||||||
|  | |||||||
| @ -3,8 +3,8 @@ package callbacks | |||||||
| import ( | import ( | ||||||
| 	"sort" | 	"sort" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // SelectAndOmitColumns get select and omit columns, select -> true, omit -> false
 | // SelectAndOmitColumns get select and omit columns, select -> true, omit -> false
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| package callbacks | package callbacks | ||||||
| 
 | 
 | ||||||
| import "github.com/jinzhu/gorm" | import "gorm.io/gorm" | ||||||
| 
 | 
 | ||||||
| type beforeSaveInterface interface { | type beforeSaveInterface interface { | ||||||
| 	BeforeSave(*gorm.DB) error | 	BeforeSave(*gorm.DB) error | ||||||
|  | |||||||
| @ -3,10 +3,10 @@ package callbacks | |||||||
| import ( | import ( | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) { | func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) { | ||||||
|  | |||||||
| @ -6,9 +6,9 @@ import ( | |||||||
| 	"sort" | 	"sort" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func Query(db *gorm.DB) { | func Query(db *gorm.DB) { | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| package callbacks | package callbacks | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func RawExec(db *gorm.DB) { | func RawExec(db *gorm.DB) { | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| package callbacks | package callbacks | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func RowQuery(db *gorm.DB) { | func RowQuery(db *gorm.DB) { | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| package callbacks | package callbacks | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func BeginTransaction(db *gorm.DB) { | func BeginTransaction(db *gorm.DB) { | ||||||
|  | |||||||
| @ -4,9 +4,9 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"sort" | 	"sort" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func SetupUpdateReflectValue(db *gorm.DB) { | func SetupUpdateReflectValue(db *gorm.DB) { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Model specify the model you would like to run db operations
 | // Model specify the model you would like to run db operations
 | ||||||
|  | |||||||
| @ -4,10 +4,10 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func BenchmarkSelect(b *testing.B) { | func BenchmarkSelect(b *testing.B) { | ||||||
|  | |||||||
| @ -6,10 +6,10 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| var db, _ = gorm.Open(tests.DummyDialector{}, nil) | var db, _ = gorm.Open(tests.DummyDialector{}, nil) | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestDelete(t *testing.T) { | func TestDelete(t *testing.T) { | ||||||
|  | |||||||
| @ -5,10 +5,10 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestExpr(t *testing.T) { | func TestExpr(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestFrom(t *testing.T) { | func TestFrom(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestGroupBy(t *testing.T) { | func TestGroupBy(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestInsert(t *testing.T) { | func TestInsert(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestLimit(t *testing.T) { | func TestLimit(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestFor(t *testing.T) { | func TestFor(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestOrderBy(t *testing.T) { | func TestOrderBy(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestReturning(t *testing.T) { | func TestReturning(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestSelect(t *testing.T) { | func TestSelect(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestSet(t *testing.T) { | func TestSet(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestUpdate(t *testing.T) { | func TestUpdate(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestValues(t *testing.T) { | func TestValues(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestWhere(t *testing.T) { | func TestWhere(t *testing.T) { | ||||||
|  | |||||||
| @ -4,10 +4,10 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"sort" | 	"sort" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/callbacks" | 	"gorm.io/gorm/callbacks" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func Create(db *gorm.DB) { | func Create(db *gorm.DB) { | ||||||
|  | |||||||
| @ -3,9 +3,9 @@ package mssql | |||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Migrator struct { | type Migrator struct { | ||||||
|  | |||||||
| @ -7,12 +7,12 @@ import ( | |||||||
| 	"strconv" | 	"strconv" | ||||||
| 
 | 
 | ||||||
| 	_ "github.com/denisenkom/go-mssqldb" | 	_ "github.com/denisenkom/go-mssqldb" | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/callbacks" | 	"gorm.io/gorm/callbacks" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Dialector struct { | type Dialector struct { | ||||||
|  | |||||||
| @ -3,9 +3,9 @@ package mysql | |||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Migrator struct { | type Migrator struct { | ||||||
|  | |||||||
| @ -6,12 +6,12 @@ import ( | |||||||
| 	"math" | 	"math" | ||||||
| 
 | 
 | ||||||
| 	_ "github.com/go-sql-driver/mysql" | 	_ "github.com/go-sql-driver/mysql" | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/callbacks" | 	"gorm.io/gorm/callbacks" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Dialector struct { | type Dialector struct { | ||||||
|  | |||||||
| @ -3,10 +3,10 @@ package postgres | |||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Migrator struct { | type Migrator struct { | ||||||
|  | |||||||
| @ -6,12 +6,12 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strconv" | 	"strconv" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/callbacks" | 	"gorm.io/gorm/callbacks" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	_ "github.com/lib/pq" | 	_ "github.com/lib/pq" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -5,10 +5,10 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Migrator struct { | type Migrator struct { | ||||||
|  | |||||||
| @ -3,12 +3,12 @@ package sqlite | |||||||
| import ( | import ( | ||||||
| 	"database/sql" | 	"database/sql" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/callbacks" | 	"gorm.io/gorm/callbacks" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/migrator" | 	"gorm.io/gorm/migrator" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	_ "github.com/mattn/go-sqlite3" | 	_ "github.com/mattn/go-sqlite3" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Create insert the value into database
 | // Create insert the value into database
 | ||||||
|  | |||||||
							
								
								
									
										7
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								go.mod
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| module github.com/jinzhu/gorm | module gorm.io/gorm | ||||||
| 
 | 
 | ||||||
| go 1.14 | go 1.14 | ||||||
| 
 | 
 | ||||||
| @ -6,8 +6,9 @@ require ( | |||||||
| 	github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc | 	github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc | ||||||
| 	github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 | 	github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 | ||||||
| 	github.com/go-sql-driver/mysql v1.5.0 | 	github.com/go-sql-driver/mysql v1.5.0 | ||||||
| 	github.com/jinzhu/inflection v1.0.0 | 	gorm.io/gorm v1.9.12 | ||||||
| 	github.com/jinzhu/now v1.1.1 | 	gorm.io/inflection v1.0.0 | ||||||
|  | 	gorm.io/now v1.1.1 | ||||||
| 	github.com/lib/pq v1.1.1 | 	github.com/lib/pq v1.1.1 | ||||||
| 	github.com/mattn/go-sqlite3 v2.0.1+incompatible | 	github.com/mattn/go-sqlite3 v2.0.1+incompatible | ||||||
| ) | ) | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								gorm.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								gorm.go
									
									
									
									
									
								
							| @ -6,9 +6,9 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Config GORM config
 | // Config GORM config
 | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"context" | 	"context" | ||||||
| 	"database/sql" | 	"database/sql" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Dialector GORM database dialector
 | // Dialector GORM database dialector
 | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ import ( | |||||||
| 	"os" | 	"os" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Colors
 | // Colors
 | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/now" | 	"gorm.io/now" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestExplainSQL(t *testing.T) { | func TestExplainSQL(t *testing.T) { | ||||||
|  | |||||||
| @ -6,9 +6,9 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Migrator m struct
 | // Migrator m struct
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								scan.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								scan.go
									
									
									
									
									
								
							| @ -5,7 +5,7 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func Scan(rows *sql.Rows, db *DB, initialized bool) { | func Scan(rows *sql.Rows, db *DB, initialized bool) { | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type UserWithCallback struct { | type UserWithCallback struct { | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type UserCheck struct { | type UserCheck struct { | ||||||
|  | |||||||
| @ -10,8 +10,8 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| 	"github.com/jinzhu/now" | 	"gorm.io/now" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type DataType string | type DataType string | ||||||
|  | |||||||
| @ -7,9 +7,9 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestFieldValuerAndSetter(t *testing.T) { | func TestFieldValuerAndSetter(t *testing.T) { | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type UserIndex struct { | type UserIndex struct { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"database/sql" | 	"database/sql" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type User struct { | type User struct { | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"unicode/utf8" | 	"unicode/utf8" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/inflection" | 	"gorm.io/inflection" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Namer namer interface
 | // Namer namer interface
 | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/inflection" | 	"gorm.io/inflection" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // RelationshipType relationship type
 | // RelationshipType relationship type
 | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) { | func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) { | ||||||
|  | |||||||
| @ -8,8 +8,8 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // ErrUnsupportedDataType unsupported data type
 | // ErrUnsupportedDataType unsupported data type
 | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func checkSchema(t *testing.T, s *schema.Schema, v schema.Schema, primaryFields []string) { | func checkSchema(t *testing.T, s *schema.Schema, v schema.Schema, primaryFields []string) { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"sync" | 	"sync" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| 	"github.com/jinzhu/gorm/tests" | 	"gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestParseSchema(t *testing.T) { | func TestParseSchema(t *testing.T) { | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import ( | |||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/utils" | 	"gorm.io/gorm/utils" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func ParseTagSetting(str string, sep string) map[string]string { | func ParseTagSetting(str string, sep string) map[string]string { | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ import ( | |||||||
| 	"database/sql/driver" | 	"database/sql/driver" | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type DeletedAt sql.NullTime | type DeletedAt sql.NullTime | ||||||
|  | |||||||
| @ -10,8 +10,8 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"sync" | 	"sync" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Statement statement
 | // Statement statement
 | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestBelongsToAssociation(t *testing.T) { | func TestBelongsToAssociation(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestHasManyAssociation(t *testing.T) { | func TestHasManyAssociation(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestHasOneAssociation(t *testing.T) { | func TestHasOneAssociation(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestMany2ManyAssociation(t *testing.T) { | func TestMany2ManyAssociation(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) { | func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) { | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) { | func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestCount(t *testing.T) { | func TestCount(t *testing.T) { | ||||||
|  | |||||||
| @ -4,9 +4,9 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| 	"github.com/jinzhu/now" | 	"gorm.io/now" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestCreate(t *testing.T) { | func TestCreate(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestCustomizeColumn(t *testing.T) { | func TestCustomizeColumn(t *testing.T) { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"errors" | 	"errors" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestDelete(t *testing.T) { | func TestDelete(t *testing.T) { | ||||||
|  | |||||||
| @ -1,10 +1,10 @@ | |||||||
| package tests | package tests | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| 	"github.com/jinzhu/gorm/schema" | 	"gorm.io/gorm/schema" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type DummyDialector struct { | type DummyDialector struct { | ||||||
|  | |||||||
| @ -3,8 +3,8 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestEmbeddedStruct(t *testing.T) { | func TestEmbeddedStruct(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestGroupBy(t *testing.T) { | func TestGroupBy(t *testing.T) { | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Product struct { | type Product struct { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Person struct { | type Person struct { | ||||||
|  | |||||||
| @ -4,8 +4,8 @@ import ( | |||||||
| 	"sort" | 	"sort" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestJoins(t *testing.T) { | func TestJoins(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestMain(m *testing.M) { | func TestMain(m *testing.M) { | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestMigrate(t *testing.T) { | func TestMigrate(t *testing.T) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"database/sql" | 	"database/sql" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic)
 | // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic)
 | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ import ( | |||||||
| 	"sort" | 	"sort" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Blog struct { | type Blog struct { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Hamster struct { | type Hamster struct { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| type Animal struct { | type Animal struct { | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ import ( | |||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func toJSONString(v interface{}) []byte { | func toJSONString(v interface{}) []byte { | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ import ( | |||||||
| 	"strconv" | 	"strconv" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm/clause" | 	"gorm.io/gorm/clause" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestNestedPreload(t *testing.T) { | func TestNestedPreload(t *testing.T) { | ||||||
|  | |||||||
| @ -8,8 +8,8 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestFind(t *testing.T) { | func TestFind(t *testing.T) { | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ import ( | |||||||
| 	"strings" | 	"strings" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestScan(t *testing.T) { | func TestScan(t *testing.T) { | ||||||
|  | |||||||
| @ -10,8 +10,8 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestScannerValuer(t *testing.T) { | func TestScannerValuer(t *testing.T) { | ||||||
|  | |||||||
| @ -3,8 +3,8 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func NameIn1And2(d *gorm.DB) *gorm.DB { | func NameIn1And2(d *gorm.DB) *gorm.DB { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestSoftDelete(t *testing.T) { | func TestSoftDelete(t *testing.T) { | ||||||
|  | |||||||
| @ -3,8 +3,8 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestRow(t *testing.T) { | func TestRow(t *testing.T) { | ||||||
|  | |||||||
| @ -7,12 +7,12 @@ import ( | |||||||
| 	"path/filepath" | 	"path/filepath" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	"github.com/jinzhu/gorm/dialects/mssql" | 	"gorm.io/gorm/dialects/mssql" | ||||||
| 	"github.com/jinzhu/gorm/dialects/mysql" | 	"gorm.io/gorm/dialects/mysql" | ||||||
| 	"github.com/jinzhu/gorm/dialects/postgres" | 	"gorm.io/gorm/dialects/postgres" | ||||||
| 	"github.com/jinzhu/gorm/dialects/sqlite" | 	"gorm.io/gorm/dialects/sqlite" | ||||||
| 	"github.com/jinzhu/gorm/logger" | 	"gorm.io/gorm/logger" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| var DB *gorm.DB | var DB *gorm.DB | ||||||
|  | |||||||
| @ -5,8 +5,8 @@ import ( | |||||||
| 	"errors" | 	"errors" | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jinzhu/gorm" | 	"gorm.io/gorm" | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestTransaction(t *testing.T) { | func TestTransaction(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestUpdateBelongsTo(t *testing.T) { | func TestUpdateBelongsTo(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestUpdateHasManyAssociations(t *testing.T) { | func TestUpdateHasManyAssociations(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestUpdateHasOne(t *testing.T) { | func TestUpdateHasOne(t *testing.T) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ package tests_test | |||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	. "github.com/jinzhu/gorm/tests" | 	. "gorm.io/gorm/tests" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func TestUpdateMany2ManyAssociations(t *testing.T) { | func TestUpdateMany2ManyAssociations(t *testing.T) { | ||||||
|  | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jinzhu
						Jinzhu