- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for MatchString (0.28 sec)
-
tests/table_test.go
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) -
tests/sql_builder_test.go
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) { t.Errorf("Failed to generate sql, got %v", 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/scanner_valuer_test.go
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()) } if !reflect.DeepEqual([]interface{}{"jinzhu", "POINT(100 100)"}, stmt.Vars) {
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
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 DB.Preload("Team").Preload("Languages").Preload("Friends").Find(&results, "name = ?", user.Name)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
internal/event/target/postgresql.go
} var errInvalidPsqlTablename = errors.New("invalid PostgreSQL table") func validatePsqlTableName(name string) error { // check for quoted string (string may not contain a quote) if match, err := regexp.MatchString("^\"[^\"]+\"$", name); err != nil { return err } else if match { return nil } // normalize the name to letters, digits, _ or $ valid := true cleaned := strings.Map(func(r rune) rune {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
istioctl/pkg/admin/istiodconfig.go
scope string logLevel string } type scopeStackTraceLevelPair ScopeLevelPair func newScopeLevelPair(slp, validationPattern string) (*ScopeLevelPair, error) { matched, err := regexp.MatchString(validationPattern, slp) if err != nil { return nil, err } if !matched { return nil, fmt.Errorf("pattern %s did not match", slp) } scopeLogLevel := strings.Split(slp, ":") s := &ScopeLevelPair{
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Sat Apr 13 05:23:38 UTC 2024 - 13.5K 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
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()) } } user := *GetUser("upsert_on_conflict", Config{}) user.Age = 20
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
internal/http/listener_test.go
ip = v.IP } if ip.To4() != nil { localIP4.Add(ip.String()) } } // Filter ipList by IPs those do not start with '127.'. nonLoopBackIPs := localIP4.FuncMatch(func(ip string, matchString string) bool { return !strings.HasPrefix(ip, "127.") }, "") if len(nonLoopBackIPs) == 0 { t.Fatalf("No non-loop back IP address found for this host") } nonLoopBackIP := nonLoopBackIPs.ToSlice()[0]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 17:41:02 UTC 2024 - 11.8K bytes - Viewed (0) -
cmd/endpoint_test.go
defer func() { globalMinioPort = tempGlobalMinioPort }() globalMinioPort = "9000" // Filter ipList by IPs those do not start with '127.'. nonLoopBackIPs := localIP4.FuncMatch(func(ip string, matchString string) bool { return !net.ParseIP(ip).IsLoopback() }, "") if len(nonLoopBackIPs) == 0 { t.Fatalf("No non-loop back IP address found for this host") } nonLoopBackIP := nonLoopBackIPs.ToSlice()[0]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jan 13 07:53:03 UTC 2024 - 18.9K bytes - Viewed (0)