Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for MustCompile (0.49 sec)

  1. tests/table_test.go

    	r := dryDB.Table("`user`").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    	r = dryDB.Table("user as u").Select("name").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT .name. FROM user as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. tests/sql_builder_test.go

    	sql := DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=8,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    
    	stmt = dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageUint64(10241024)}).Statement
    	sql = DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=10241024,`).MatchString(sql) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  3. tests/scanner_valuer_test.go

    		Name:  "jinzhu",
    		Point: Point{X: 100, Y: 100},
    	}).Statement
    
    	if stmt.SQL.String() == "" || len(stmt.Vars) != 2 {
    		t.Errorf("Failed to generate sql, got %v", stmt.SQL.String())
    	}
    
    	if !regexp.MustCompile(`INSERT INTO .user_with_points. \(.name.,.point.\) VALUES \(.+,ST_PointFromText\(.+\)\)`).MatchString(stmt.SQL.String()) {
    		t.Errorf("insert with sql.Expr, but got %v", stmt.SQL.String())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  4. istioctl/pkg/validate/validate_test.go

    			name: "valid Kubernetes YAML",
    			args: []string{"--filename", validKubernetesYAMLFile},
    			expectedRegexp: regexp.MustCompile(`^".*" is valid
    $`),
    			wantError: false,
    		},
    		{
    			name: "valid Kubernetes JSON",
    			args: []string{"--filename", validKubernetesJSONFile},
    			expectedRegexp: regexp.MustCompile(`^".*" is valid
    $`),
    			wantError: false,
    		},
    		{
    			name:           "invalid top-level key",
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Jul 25 08:08:36 GMT 2023
    - 21.5K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/endtoend_test.go

    // It might be at the beginning but it might be in the middle of the printed instruction.
    var fileLineRE = regexp.MustCompile(`(?:^|\()(testdata[/\\][\da-z]+\.s:\d+)(?:$|\)|:)`)
    
    // Same as in test/run.go
    var (
    	errRE       = regexp.MustCompile(`// ERROR ?(.*)`)
    	errQuotesRE = regexp.MustCompile(`"([^"]*)"`)
    )
    
    func testErrors(t *testing.T, goarch, file string, flags ...string) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  6. tests/preload_test.go

    	DB.Preload("Team").Preload("Languages").Preload("Friends").First(&user, "name = ?", user.Name)
    
    	if r, err := json.Marshal(&user); err != nil {
    		t.Errorf("failed to marshal users, got error %v", err)
    	} else if !regexp.MustCompile(`"Team":\[\],"Languages":\[\],"Friends":\[\]`).MatchString(string(r)) {
    		t.Errorf("json marshal is not empty slice, got %v", string(r))
    	}
    
    	var results []User
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/podcgroupns.go

    	// namespaced). As such, the regex has been relaxed to simply find the pod UID
    	// followed by the container ID with allowances for arbitrary punctuation, and
    	// container runtime prefixes, etc.
    	regexp.MustCompile(`` +
    		// "pod"-prefixed Pod UID (with punctuation separated groups) followed by punctuation
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  8. tests/upsert_test.go

    		}
    
    		r := DB.Session(&gorm.Session{DryRun: true}).Clauses(clause.OnConflict{UpdateAll: true}).Create(&RestrictedLanguage{Code: "upsert_code", Name: "upsert_name", Lang: "upsert_lang"})
    		if !regexp.MustCompile(`INTO .restricted_languages. .*\(.code.,.name.,.lang.\) .* (SET|UPDATE) .name.=.*.name.\W*$`).MatchString(r.Statement.SQL.String()) {
    			t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  9. tests/joins_test.go

    	if !regexp.MustCompile("SELECT .* FROM .users. left join pets.*join accounts.*").MatchString(stmt.SQL.String()) {
    		t.Errorf("joins should be ordered, but got %v", stmt.SQL.String())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  10. cmd/bucket-replication-utils.go

    		if t.PrevReplicationStatus != replication.Completed {
    			return t.ReplicationAction
    		}
    	}
    	return replicateNone
    }
    
    var replStatusRegex = regexp.MustCompile(`([^=].*?)=([^,].*?);`)
    
    // TargetReplicationStatus - returns replication status of a target
    func (ri ReplicateObjectInfo) TargetReplicationStatus(arn string) (status replication.StatusType) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 26.2K bytes
    - Viewed (0)
Back to top