Modify gorm.io ref
This commit is contained in:
		
							parent
							
								
									328f301982
								
							
						
					
					
						commit
						bcfcdc2825
					
				@ -5,9 +5,9 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Association Mode contains some helper methods to handle relationship things easily.
 | 
					// Association Mode contains some helper methods to handle relationship things easily.
 | 
				
			||||||
 | 
				
			|||||||
@ -8,8 +8,8 @@ import (
 | 
				
			|||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func initializeCallbacks(db *DB) *callbacks {
 | 
					func initializeCallbacks(db *DB) *callbacks {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,10 +4,10 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func SaveBeforeAssociations(create bool) func(db *gorm.DB) {
 | 
					func SaveBeforeAssociations(create bool) func(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package callbacks
 | 
					package callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package callbacks
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
 | 
					func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,10 +4,10 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// BeforeCreate before create hooks
 | 
					// BeforeCreate before create hooks
 | 
				
			||||||
 | 
				
			|||||||
@ -4,10 +4,10 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func BeforeDelete(db *gorm.DB) {
 | 
					func BeforeDelete(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ConvertMapToValuesForCreate convert map to values
 | 
					// ConvertMapToValuesForCreate convert map to values
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
package callbacks
 | 
					package callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "gorm.io/gorm"
 | 
					import "github.com/brucewangviki/gorm"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type BeforeCreateInterface interface {
 | 
					type BeforeCreateInterface interface {
 | 
				
			||||||
	BeforeCreate(*gorm.DB) error
 | 
						BeforeCreate(*gorm.DB) error
 | 
				
			||||||
 | 
				
			|||||||
@ -4,10 +4,10 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func preload(tx *gorm.DB, rel *schema.Relationship, conds []interface{}, preloads map[string][]interface{}) error {
 | 
					func preload(tx *gorm.DB, rel *schema.Relationship, conds []interface{}, preloads map[string][]interface{}) error {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func Query(db *gorm.DB) {
 | 
					func Query(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package callbacks
 | 
					package callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func RawExec(db *gorm.DB) {
 | 
					func RawExec(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package callbacks
 | 
					package callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func RowQuery(db *gorm.DB) {
 | 
					func RowQuery(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package callbacks
 | 
					package callbacks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func BeginTransaction(db *gorm.DB) {
 | 
					func BeginTransaction(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,10 +4,10 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func SetupUpdateReflectValue(db *gorm.DB) {
 | 
					func SetupUpdateReflectValue(db *gorm.DB) {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func BenchmarkSelect(b *testing.B) {
 | 
					func BenchmarkSelect(b *testing.B) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,10 +6,10 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var db, _ = gorm.Open(tests.DummyDialector{}, nil)
 | 
					var db, _ = gorm.Open(tests.DummyDialector{}, nil)
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestDelete(t *testing.T) {
 | 
					func TestDelete(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,10 +7,10 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestExpr(t *testing.T) {
 | 
					func TestExpr(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestFrom(t *testing.T) {
 | 
					func TestFrom(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestGroupBy(t *testing.T) {
 | 
					func TestGroupBy(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestInsert(t *testing.T) {
 | 
					func TestInsert(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestLimit(t *testing.T) {
 | 
					func TestLimit(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestLocking(t *testing.T) {
 | 
					func TestLocking(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestOrderBy(t *testing.T) {
 | 
					func TestOrderBy(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestReturning(t *testing.T) {
 | 
					func TestReturning(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSelect(t *testing.T) {
 | 
					func TestSelect(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSet(t *testing.T) {
 | 
					func TestSet(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestUpdate(t *testing.T) {
 | 
					func TestUpdate(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestValues(t *testing.T) {
 | 
					func TestValues(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestWhere(t *testing.T) {
 | 
					func TestWhere(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package gorm
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
 | 
				
			|||||||
@ -7,10 +7,10 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Create inserts value, returning the inserted data's primary key in value's id
 | 
					// Create inserts value, returning the inserted data's primary key in value's id
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@ -1,4 +1,4 @@
 | 
				
			|||||||
module gorm.io/gorm
 | 
					module github.com/brucewangviki/gorm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
go 1.16
 | 
					go 1.16
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								gorm.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								gorm.go
									
									
									
									
									
								
							@ -8,9 +8,9 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// for Config.cacheStore store PreparedStmtDB key
 | 
					// for Config.cacheStore store PreparedStmtDB key
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"database/sql"
 | 
						"database/sql"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Dialector GORM database dialector
 | 
					// Dialector GORM database dialector
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@ import (
 | 
				
			|||||||
	"os"
 | 
						"os"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ErrRecordNotFound record not found error
 | 
					// ErrRecordNotFound record not found error
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ import (
 | 
				
			|||||||
	"time"
 | 
						"time"
 | 
				
			||||||
	"unicode"
 | 
						"unicode"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/jinzhu/now"
 | 
						"github.com/jinzhu/now"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type JSON json.RawMessage
 | 
					type JSON json.RawMessage
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,8 @@ package gorm
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Migrator returns migrator
 | 
					// Migrator returns migrator
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,9 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								scan.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								scan.go
									
									
									
									
									
								
							@ -7,7 +7,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// prepareValues prepare values slice
 | 
					// prepareValues prepare values slice
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type UserWithCallback struct{}
 | 
					type UserWithCallback struct{}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type UserCheck struct {
 | 
					type UserCheck struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -12,8 +12,8 @@ import (
 | 
				
			|||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/jinzhu/now"
 | 
						"github.com/jinzhu/now"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// special types' reflect type
 | 
					// special types' reflect type
 | 
				
			||||||
 | 
				
			|||||||
@ -8,9 +8,9 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestFieldValuerAndSetter(t *testing.T) {
 | 
					func TestFieldValuerAndSetter(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type UserIndex struct {
 | 
					type UserIndex struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
package schema
 | 
					package schema
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// GormDataTypeInterface gorm data type interface
 | 
					// GormDataTypeInterface gorm data type interface
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"database/sql"
 | 
						"database/sql"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type User struct {
 | 
					type User struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/jinzhu/inflection"
 | 
						"github.com/jinzhu/inflection"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// RelationshipType relationship type
 | 
					// RelationshipType relationship type
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ErrUnsupportedDataType unsupported data type
 | 
					// ErrUnsupportedDataType unsupported data type
 | 
				
			||||||
 | 
				
			|||||||
@ -7,8 +7,8 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/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) {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,9 +5,9 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils/tests"
 | 
						"github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestParseSchema(t *testing.T) {
 | 
					func TestParseSchema(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,8 +7,8 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var embeddedCacheKey = "embedded_cache_store"
 | 
					var embeddedCacheKey = "embedded_cache_store"
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"encoding/json"
 | 
						"encoding/json"
 | 
				
			||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type DeletedAt sql.NullTime
 | 
					type DeletedAt sql.NullTime
 | 
				
			||||||
 | 
				
			|||||||
@ -12,10 +12,10 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	"gorm.io/gorm/utils"
 | 
						"github.com/brucewangviki/gorm/utils"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Statement statement
 | 
					// Statement statement
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,7 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestWhereCloneCorruption(t *testing.T) {
 | 
					func TestWhereCloneCorruption(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestBelongsToAssociation(t *testing.T) {
 | 
					func TestBelongsToAssociation(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestHasManyAssociation(t *testing.T) {
 | 
					func TestHasManyAssociation(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestHasOneAssociation(t *testing.T) {
 | 
					func TestHasOneAssociation(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,8 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestMany2ManyAssociation(t *testing.T) {
 | 
					func TestMany2ManyAssociation(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,10 +3,10 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/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) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func BenchmarkCreate(b *testing.B) {
 | 
					func BenchmarkCreate(b *testing.B) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) {
 | 
					func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/driver/mysql"
 | 
						"github.com/brucewangviki/driver/mysql"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestWithSingleConnection(t *testing.T) {
 | 
					func TestWithSingleConnection(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,9 +7,9 @@ import (
 | 
				
			|||||||
	"reflect"
 | 
						"reflect"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/driver/mysql"
 | 
						"github.com/brucewangviki/driver/mysql"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type wrapperTx struct {
 | 
					type wrapperTx struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,8 +7,8 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestCount(t *testing.T) {
 | 
					func TestCount(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,10 +6,10 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
	"github.com/jinzhu/now"
 | 
						"github.com/jinzhu/now"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
					 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
					 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestCreate(t *testing.T) {
 | 
					func TestCreate(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestCustomizeColumn(t *testing.T) {
 | 
					func TestCustomizeColumn(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestDefaultValue(t *testing.T) {
 | 
					func TestDefaultValue(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,9 +4,9 @@ import (
 | 
				
			|||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestDelete(t *testing.T) {
 | 
					func TestDelete(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestDistinct(t *testing.T) {
 | 
					func TestDistinct(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestEmbeddedStruct(t *testing.T) {
 | 
					func TestEmbeddedStruct(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestReturningWithNullToZeroValues(t *testing.T) {
 | 
					func TestReturningWithNullToZeroValues(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestGroupBy(t *testing.T) {
 | 
					func TestGroupBy(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Config struct {
 | 
					type Config struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Product struct {
 | 
					type Product struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Person struct {
 | 
					type Person struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestJoins(t *testing.T) {
 | 
					func TestJoins(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestExceptionsWithInvalidSql(t *testing.T) {
 | 
					func TestExceptionsWithInvalidSql(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,9 @@ import (
 | 
				
			|||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/driver/postgres"
 | 
						"gorm.io/driver/postgres"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestMigrate(t *testing.T) {
 | 
					func TestMigrate(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"sort"
 | 
						"sort"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Blog struct {
 | 
					type Blog struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestNamedArg(t *testing.T) {
 | 
					func TestNamedArg(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ package tests_test
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Hamster struct {
 | 
					type Hamster struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ import (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	"github.com/google/uuid"
 | 
						"github.com/google/uuid"
 | 
				
			||||||
	"github.com/lib/pq"
 | 
						"github.com/lib/pq"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestPostgresReturningIDWhichHasStringType(t *testing.T) {
 | 
					func TestPostgresReturningIDWhichHasStringType(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@ import (
 | 
				
			|||||||
	"sync/atomic"
 | 
						"sync/atomic"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func toJSONString(v interface{}) []byte {
 | 
					func toJSONString(v interface{}) []byte {
 | 
				
			||||||
 | 
				
			|||||||
@ -8,9 +8,9 @@ import (
 | 
				
			|||||||
	"sync"
 | 
						"sync"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestPreloadWithAssociations(t *testing.T) {
 | 
					func TestPreloadWithAssociations(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestPreparedStmt(t *testing.T) {
 | 
					func TestPreparedStmt(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,9 +11,9 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestFind(t *testing.T) {
 | 
					func TestFind(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type PersonAddressInfo struct {
 | 
					type PersonAddressInfo struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -13,9 +13,9 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestScannerValuer(t *testing.T) {
 | 
					func TestScannerValuer(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func NameIn1And2(d *gorm.DB) *gorm.DB {
 | 
					func NameIn1And2(d *gorm.DB) *gorm.DB {
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,9 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/schema"
 | 
						"github.com/brucewangviki/gorm/schema"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type SerializerStruct struct {
 | 
					type SerializerStruct struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,8 +7,8 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestSoftDelete(t *testing.T) {
 | 
					func TestSoftDelete(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -6,9 +6,9 @@ import (
 | 
				
			|||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/clause"
 | 
						"github.com/brucewangviki/gorm/clause"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestRow(t *testing.T) {
 | 
					func TestRow(t *testing.T) {
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,8 @@ import (
 | 
				
			|||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type UserWithTable struct {
 | 
					type UserWithTable struct {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,9 +11,9 @@ import (
 | 
				
			|||||||
	"gorm.io/driver/postgres"
 | 
						"gorm.io/driver/postgres"
 | 
				
			||||||
	"gorm.io/driver/sqlite"
 | 
						"gorm.io/driver/sqlite"
 | 
				
			||||||
	"gorm.io/driver/sqlserver"
 | 
						"gorm.io/driver/sqlserver"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	"gorm.io/gorm/logger"
 | 
						"github.com/brucewangviki/gorm/logger"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var DB *gorm.DB
 | 
					var DB *gorm.DB
 | 
				
			||||||
 | 
				
			|||||||
@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"testing"
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"github.com/brucewangviki/gorm"
 | 
				
			||||||
	. "gorm.io/gorm/utils/tests"
 | 
						. "github.com/brucewangviki/gorm/utils/tests"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestTransaction(t *testing.T) {
 | 
					func TestTransaction(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