Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for jinzhu1 (0.13 sec)

  1. schema/constraint_test.go

    import (
    	"reflect"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils/tests"
    )
    
    type UserCheck struct {
    	Name  string `gorm:"check:name_checker,name <> 'jinzhu'"`
    	Name2 string `gorm:"check:name <> 'jinzhu'"`
    	Name3 string `gorm:"check:,name <> 'jinzhu'"`
    }
    
    func TestParseCheck(t *testing.T) {
    	user, err := schema.Parse(&UserCheck{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. go.sum

    github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
    github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
    github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
    github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
    golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 491 bytes
    - Viewed (0)
  3. logger/sql_test.go

    			NumericRegexp: nil,
    			Vars:          []interface{}{"jinzhu", 1, 999.99, true, []byte("12345"), tt, &tt, nil, "w@g.\"com", myrole, pwd},
    			Result:        `create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values ("jinzhu", 1, 999.99, true, "12345", "2020-02-23 11:10:10", "2020-02-23 11:10:10", NULL, "w@g.""com", "admin", "pass")`,
    		},
    		{
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 08:00:02 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. clause/where_test.go

    			}},
    			"SELECT * FROM `users` WHERE `users`.`id` = ? AND `age` > ? OR `name` <> ?",
    			[]interface{}{"1", 18, "jinzhu"},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Apr 25 12:22:53 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. go.mod

    module gorm.io/gorm
    
    go 1.18
    
    require (
    	github.com/jinzhu/inflection v1.0.0
    	github.com/jinzhu/now v1.1.5
    	golang.org/x/text v0.14.0
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 136 bytes
    - Viewed (0)
  6. tests/go.mod

    module gorm.io/gorm/tests
    
    go 1.18
    
    require (
    	github.com/google/uuid v1.6.0
    	github.com/jinzhu/now v1.1.5
    	github.com/lib/pq v1.10.9
    	github.com/stretchr/testify v1.9.0
    	gorm.io/driver/mysql v1.5.7
    	gorm.io/driver/postgres v1.5.9
    	gorm.io/driver/sqlite v1.5.6
    	gorm.io/driver/sqlserver v1.5.3
    	gorm.io/gorm v1.25.10
    )
    
    require (
    	filippo.io/edwards25519 v1.1.0 // indirect
    	github.com/davecgh/go-spew v1.1.1 // indirect
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 09:24:34 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  7. tests/prepared_stmt_test.go

    	sqlDB, _ := tx.DB()
    	sqlDB.SetMaxOpenConns(1)
    
    	tx = tx.Session(&gorm.Session{PrepareStmt: true})
    
    	wg := sync.WaitGroup{}
    	for i := 0; i < 100; i++ {
    		wg.Add(1)
    		go func() {
    			user := User{Name: "jinzhu"}
    			tx.Create(&user)
    
    			var result User
    			tx.First(&result)
    			wg.Done()
    		}()
    	}
    	wg.Wait()
    
    	conn, ok := tx.ConnPool.(*gorm.PreparedStmtDB)
    	AssertEqual(t, ok, true)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 07:55:43 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. schema/index_test.go

    )
    
    type UserIndex struct {
    	Name         string `gorm:"index"`
    	Name2        string `gorm:"index:idx_name,unique"`
    	Name3        string `gorm:"index:,sort:desc,collate:utf8,type:btree,length:10,where:name3 != 'jinzhu'"`
    	Name4        string `gorm:"uniqueIndex"`
    	Name5        int64  `gorm:"index:,class:FULLTEXT,comment:hello \\, world,where:age > 10"`
    	Name6        int64  `gorm:"index:profile,comment:hello \\, world,where:age > 10"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. schema/naming.go

    package schema
    
    import (
    	"crypto/sha1"
    	"encoding/hex"
    	"regexp"
    	"strings"
    	"unicode/utf8"
    
    	"github.com/jinzhu/inflection"
    	"golang.org/x/text/cases"
    	"golang.org/x/text/language"
    )
    
    // Namer namer interface
    type Namer interface {
    	TableName(table string) string
    	SchemaName(table string) string
    	ColumnName(table, column string) string
    	JoinTableName(joinTable string) string
    	RelationshipFKName(Relationship) string
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  10. tests/associations_has_one_test.go

    	// Clear
    	DB.Model(&pets).Association("Toy").Clear()
    	AssertAssociationCount(t, pets, "Toy", 0, "After Clear")
    }
    
    func TestHasOneAssociationReplaceWithNonValidValue(t *testing.T) {
    	user := User{Name: "jinzhu", Account: Account{Number: "1"}}
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top