Rename package name

This commit is contained in:
Jinzhu 2020-06-02 09:16:07 +08:00
parent 5ecbf25b22
commit e986371a42
103 changed files with 213 additions and 211 deletions

View File

@ -2,14 +2,14 @@
The fantastic ORM library for Golang, aims to be developer friendly.
[![go report card](https://goreportcard.com/badge/github.com/jinzhu/gorm "go report card")](https://goreportcard.com/report/github.com/jinzhu/gorm)
[![go report card](https://goreportcard.com/badge/gorm.io/gorm "go report card")](https://goreportcard.com/report/gorm.io/gorm)
[![wercker status](https://app.wercker.com/status/8596cace912c9947dd9c8542ecc8cb8b/s/master "wercker status")](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b)
[![codecov](https://codecov.io/gh/jinzhu/gorm/branch/master/graph/badge.svg)](https://codecov.io/gh/jinzhu/gorm)
[![Join the chat at https://gitter.im/jinzhu/gorm](https://img.shields.io/gitter/room/jinzhu/gorm.svg)](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Open Collective Backer](https://opencollective.com/gorm/tiers/backer/badge.svg?label=backer&color=brightgreen "Open Collective Backer")](https://opencollective.com/gorm)
[![Open Collective Sponsor](https://opencollective.com/gorm/tiers/sponsor/badge.svg?label=sponsor&color=brightgreen "Open Collective Sponsor")](https://opencollective.com/gorm)
[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![GoDoc](https://godoc.org/github.com/jinzhu/gorm?status.svg)](https://godoc.org/github.com/jinzhu/gorm)
[![GoDoc](https://godoc.org/gorm.io/gorm?status.svg)](https://godoc.org/gorm.io/gorm)
## Overview
@ -39,3 +39,4 @@ The fantastic ORM library for Golang, aims to be developer friendly.
© Jinzhu, 2013~time.Now
Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License)

View File

@ -6,9 +6,9 @@ import (
"reflect"
"strings"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/utils"
)
// Association Mode contains some helper methods to handle relationship things easily.

View File

@ -7,9 +7,9 @@ import (
"reflect"
"time"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm/logger"
"gorm.io/gorm/schema"
"gorm.io/gorm/utils"
)
func initializeCallbacks(db *DB) *callbacks {

View File

@ -3,10 +3,10 @@ package callbacks
import (
"reflect"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/utils"
)
func SaveBeforeAssociations(db *gorm.DB) {

View File

@ -1,7 +1,7 @@
package callbacks
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type Config struct {

View File

@ -3,9 +3,9 @@ package callbacks
import (
"reflect"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
func BeforeCreate(db *gorm.DB) {

View File

@ -3,9 +3,9 @@ package callbacks
import (
"reflect"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
func BeforeDelete(db *gorm.DB) {

View File

@ -3,8 +3,8 @@ package callbacks
import (
"sort"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
// SelectAndOmitColumns get select and omit columns, select -> true, omit -> false

View File

@ -1,6 +1,6 @@
package callbacks
import "github.com/jinzhu/gorm"
import "gorm.io/gorm"
type beforeSaveInterface interface {
BeforeSave(*gorm.DB) error

View File

@ -3,10 +3,10 @@ package callbacks
import (
"reflect"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/utils"
)
func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) {

View File

@ -6,9 +6,9 @@ import (
"sort"
"strings"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
func Query(db *gorm.DB) {

View File

@ -1,7 +1,7 @@
package callbacks
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
func RawExec(db *gorm.DB) {

View File

@ -1,7 +1,7 @@
package callbacks
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
func RowQuery(db *gorm.DB) {

View File

@ -1,7 +1,7 @@
package callbacks
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
func BeginTransaction(db *gorm.DB) {

View File

@ -4,9 +4,9 @@ import (
"reflect"
"sort"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
func SetupUpdateReflectValue(db *gorm.DB) {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm/clause"
"gorm.io/gorm/utils"
)
// Model specify the model you would like to run db operations

View File

@ -4,10 +4,10 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
func BenchmarkSelect(b *testing.B) {

View File

@ -6,10 +6,10 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
var db, _ = gorm.Open(tests.DummyDialector{}, nil)

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestDelete(t *testing.T) {

View File

@ -5,10 +5,10 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
func TestExpr(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestFrom(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestGroupBy(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestInsert(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestLimit(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestFor(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestOrderBy(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestReturning(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestSelect(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestSet(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestUpdate(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestValues(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
func TestWhere(t *testing.T) {

View File

@ -4,10 +4,10 @@ import (
"reflect"
"sort"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/callbacks"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
func Create(db *gorm.DB) {

View File

@ -3,9 +3,9 @@ package mssql
import (
"fmt"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/migrator"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/migrator"
)
type Migrator struct {

View File

@ -7,12 +7,12 @@ import (
"strconv"
_ "github.com/denisenkom/go-mssqldb"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/callbacks"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
)
type Dialector struct {

View File

@ -3,9 +3,9 @@ package mysql
import (
"fmt"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/migrator"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/migrator"
)
type Migrator struct {

View File

@ -6,12 +6,12 @@ import (
"math"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/callbacks"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
)
type Dialector struct {

View File

@ -3,10 +3,10 @@ package postgres
import (
"fmt"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
)
type Migrator struct {

View File

@ -6,12 +6,12 @@ import (
"regexp"
"strconv"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/callbacks"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
_ "github.com/lib/pq"
)

View File

@ -5,10 +5,10 @@ import (
"regexp"
"strings"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
)
type Migrator struct {

View File

@ -3,12 +3,12 @@ package sqlite
import (
"database/sql"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/callbacks"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/migrator"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/callbacks"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/migrator"
"gorm.io/gorm/schema"
_ "github.com/mattn/go-sqlite3"
)

View File

@ -6,7 +6,7 @@ import (
"reflect"
"strings"
"github.com/jinzhu/gorm/clause"
"gorm.io/gorm/clause"
)
// Create insert the value into database

7
go.mod
View File

@ -1,4 +1,4 @@
module github.com/jinzhu/gorm
module gorm.io/gorm
go 1.14
@ -6,8 +6,9 @@ require (
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5
github.com/go-sql-driver/mysql v1.5.0
github.com/jinzhu/inflection v1.0.0
github.com/jinzhu/now v1.1.1
gorm.io/gorm v1.9.12
gorm.io/inflection v1.0.0
gorm.io/now v1.1.1
github.com/lib/pq v1.1.1
github.com/mattn/go-sqlite3 v2.0.1+incompatible
)

View File

@ -6,9 +6,9 @@ import (
"sync"
"time"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/schema"
)
// Config GORM config

View File

@ -4,8 +4,8 @@ import (
"context"
"database/sql"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
// Dialector GORM database dialector

View File

@ -6,7 +6,7 @@ import (
"os"
"time"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm/utils"
)
// Colors

View File

@ -4,8 +4,8 @@ import (
"regexp"
"testing"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/now"
"gorm.io/gorm/logger"
"gorm.io/now"
)
func TestExplainSQL(t *testing.T) {

View File

@ -6,9 +6,9 @@ import (
"reflect"
"strings"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
// Migrator m struct

View File

@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/schema"
)
func Scan(rows *sql.Rows, db *DB, initialized bool) {

View File

@ -5,8 +5,8 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
type UserWithCallback struct {

View File

@ -5,7 +5,7 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/schema"
)
type UserCheck struct {

View File

@ -10,8 +10,8 @@ import (
"sync"
"time"
"github.com/jinzhu/gorm/utils"
"github.com/jinzhu/now"
"gorm.io/gorm/utils"
"gorm.io/now"
)
type DataType string

View File

@ -7,9 +7,9 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
func TestFieldValuerAndSetter(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/schema"
)
type UserIndex struct {

View File

@ -4,8 +4,8 @@ import (
"database/sql"
"time"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
"gorm.io/gorm/tests"
)
type User struct {

View File

@ -7,7 +7,7 @@ import (
"sync"
"unicode/utf8"
"github.com/jinzhu/inflection"
"gorm.io/inflection"
)
// Namer namer interface

View File

@ -6,8 +6,8 @@ import (
"regexp"
"strings"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/inflection"
"gorm.io/gorm/clause"
"gorm.io/inflection"
)
// RelationshipType relationship type

View File

@ -4,8 +4,8 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) {

View File

@ -8,8 +8,8 @@ import (
"reflect"
"sync"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
)
// ErrUnsupportedDataType unsupported data type

View File

@ -6,8 +6,8 @@ import (
"strings"
"testing"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
func checkSchema(t *testing.T, s *schema.Schema, v schema.Schema, primaryFields []string) {

View File

@ -4,8 +4,8 @@ import (
"sync"
"testing"
"github.com/jinzhu/gorm/schema"
"github.com/jinzhu/gorm/tests"
"gorm.io/gorm/schema"
"gorm.io/gorm/tests"
)
func TestParseSchema(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/jinzhu/gorm/utils"
"gorm.io/gorm/utils"
)
func ParseTagSetting(str string, sep string) map[string]string {

View File

@ -5,8 +5,8 @@ import (
"database/sql/driver"
"reflect"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
type DeletedAt sql.NullTime

View File

@ -10,8 +10,8 @@ import (
"strings"
"sync"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
)
// Statement statement

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestBelongsToAssociation(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestHasManyAssociation(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestHasOneAssociation(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestMany2ManyAssociation(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) {

View File

@ -7,7 +7,7 @@ import (
"strings"
"testing"
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestCount(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"github.com/jinzhu/now"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
"gorm.io/now"
)
func TestCreate(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"testing"
"time"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestCustomizeColumn(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"errors"
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestDelete(t *testing.T) {

View File

@ -1,10 +1,10 @@
package tests
import (
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/clause"
"github.com/jinzhu/gorm/logger"
"github.com/jinzhu/gorm/schema"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"gorm.io/gorm/logger"
"gorm.io/gorm/schema"
)
type DummyDialector struct {

View File

@ -3,8 +3,8 @@ package tests_test
import (
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestEmbeddedStruct(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestGroupBy(t *testing.T) {

View File

@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
type Product struct {

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
type Person struct {

View File

@ -4,8 +4,8 @@ import (
"sort"
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestJoins(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestMain(m *testing.M) {

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestMigrate(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"time"
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic)

View File

@ -5,7 +5,7 @@ import (
"sort"
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
type Blog struct {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
type Hamster struct {

View File

@ -4,7 +4,7 @@ import (
"testing"
"time"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
type Animal struct {

View File

@ -6,8 +6,8 @@ import (
"reflect"
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func toJSONString(v interface{}) []byte {

View File

@ -5,8 +5,8 @@ import (
"strconv"
"testing"
"github.com/jinzhu/gorm/clause"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm/clause"
. "gorm.io/gorm/tests"
)
func TestNestedPreload(t *testing.T) {

View File

@ -8,8 +8,8 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestFind(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"strings"
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestScan(t *testing.T) {

View File

@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestScannerValuer(t *testing.T) {

View File

@ -3,8 +3,8 @@ package tests_test
import (
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func NameIn1And2(d *gorm.DB) *gorm.DB {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestSoftDelete(t *testing.T) {

View File

@ -3,8 +3,8 @@ package tests_test
import (
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestRow(t *testing.T) {

View File

@ -7,12 +7,12 @@ import (
"path/filepath"
"time"
"github.com/jinzhu/gorm"
"github.com/jinzhu/gorm/dialects/mssql"
"github.com/jinzhu/gorm/dialects/mysql"
"github.com/jinzhu/gorm/dialects/postgres"
"github.com/jinzhu/gorm/dialects/sqlite"
"github.com/jinzhu/gorm/logger"
"gorm.io/gorm"
"gorm.io/gorm/dialects/mssql"
"gorm.io/gorm/dialects/mysql"
"gorm.io/gorm/dialects/postgres"
"gorm.io/gorm/dialects/sqlite"
"gorm.io/gorm/logger"
)
var DB *gorm.DB

View File

@ -5,8 +5,8 @@ import (
"errors"
"testing"
"github.com/jinzhu/gorm"
. "github.com/jinzhu/gorm/tests"
"gorm.io/gorm"
. "gorm.io/gorm/tests"
)
func TestTransaction(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestUpdateBelongsTo(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestUpdateHasManyAssociations(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestUpdateHasOne(t *testing.T) {

View File

@ -3,7 +3,7 @@ package tests_test
import (
"testing"
. "github.com/jinzhu/gorm/tests"
. "gorm.io/gorm/tests"
)
func TestUpdateMany2ManyAssociations(t *testing.T) {

Some files were not shown because too many files have changed in this diff Show More