- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for MustCompile (0.08 sec)
-
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) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0) -
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()) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
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",
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Aug 02 16:18:14 UTC 2024 - 21.4K bytes - Viewed (0) -
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()) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
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
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 11K bytes - Viewed (0) -
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) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Dec 07 18:42:59 UTC 2023 - 11.6K bytes - Viewed (0) -
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()) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
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()) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
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) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:31:51 UTC 2024 - 26.3K bytes - Viewed (0)