Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for English (0.26 sec)

  1. tests/update_many2many_test.go

    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Languages = []Language{{Code: "zh-CN", Name: "Chinese"}, {Code: "en", Name: "English"}}
    	for _, lang := range user.Languages {
    		DB.Create(&lang)
    	}
    	user.Friends = []*User{{Name: "friend-1"}, {Name: "friend-2"}}
    
    	if err := DB.Save(&user).Error; err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  2. schema/constraint.go

    package schema
    
    import (
    	"regexp"
    	"strings"
    
    	"gorm.io/gorm/clause"
    )
    
    // reg match english letters and midline
    var regEnLetterAndMidline = regexp.MustCompile(`^[\w-]+$`)
    
    type CheckConstraint struct {
    	Name       string
    	Constraint string // length(phone) >= 10
    	*Field
    }
    
    func (chk *CheckConstraint) GetName() string { return chk.Name }
    
    func (chk *CheckConstraint) Build() (sql string, vars []interface{}) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  3. schema/relationship.go

    				if matched {
    					return nil
    				}
    			}
    		}
    	}
    
    	var (
    		name     string
    		idx      = strings.Index(str, ",")
    		settings = ParseTagSetting(str, ",")
    	)
    
    	// optimize match english letters and midline
    	// The following code is basically called in for.
    	// In order to avoid the performance problems caused by repeated compilation of regular expressions,
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top