- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for FieldsFunc (0.06 sec)
-
utils/utils_test.go
"errors" "math" "strings" "testing" "time" ) func TestIsValidDBNameChar(t *testing.T) { for _, db := range []string{"db", "dbName", "db_name", "db1", "1dbname", "db$name"} { if fields := strings.FieldsFunc(db, IsValidDBNameChar); len(fields) != 1 { t.Fatalf("failed to parse db name %v", db) } } } func TestCheckTruth(t *testing.T) { checkTruthTests := []struct { v string out bool }{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.9K bytes - Viewed (0) -
finisher_api.go
expr := clause.Expr{SQL: "count(*)"} if len(tx.Statement.Selects) == 1 { dbName := tx.Statement.Selects[0] fields := strings.FieldsFunc(dbName, utils.IsValidDBNameChar) if len(fields) == 1 || (len(fields) == 3 && (strings.ToUpper(fields[1]) == "AS" || fields[1] == ".")) { if tx.Statement.Parse(tx.Statement.Model) == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
src/bytes/bytes.go
a[na] = s[fieldStart:len(s):len(s)] } return a } // FieldsFunc interprets s as a sequence of UTF-8-encoded code points. // It splits the slice s at each run of code points c satisfying f(c) and // returns a slice of subslices of s. If all code points in s satisfy f(c), or // len(s) == 0, an empty slice is returned. // // FieldsFunc makes no guarantees about the order in which it calls f(c)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0)