Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for TITLE (0.14 sec)

  1. tests/postgres_test.go

    	}
    
    	DB.Migrator().DropTable(&Post{}, &Category{}, "post_categories")
    	DB.AutoMigrate(&Post{}, &Category{})
    
    	post := Post{
    		Title: "Hello World",
    		Categories: []*Category{
    			{Title: "Coding"},
    			{Title: "Golang"},
    		},
    	}
    
    	if err := DB.Create(&post).Error; err != nil {
    		t.Errorf("Failed, got error: %v", err)
    	}
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Oct 08 09:16:32 GMT 2022
    - 6.4K bytes
    - Viewed (3)
  2. schema/naming.go

    	}
    	ret := buf.String()
    	return ret
    }
    
    func (ns NamingStrategy) toSchemaName(name string) string {
    	result := strings.ReplaceAll(strings.Title(strings.ReplaceAll(name, "_", " ")), " ", "")
    	for _, initialism := range commonInitialisms {
    		result = regexp.MustCompile(strings.Title(strings.ToLower(initialism))+"([A-Z]|$|_)").ReplaceAllString(result, initialism+"$1")
    	}
    	return result
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  3. schema/relationship.go

    				return
    			}
    		}
    	}
    
    	for idx, ownField := range ownForeignFields {
    		joinFieldName := strings.Title(schema.Name) + ownField.Name
    		if len(joinForeignKeys) > idx {
    			joinFieldName = strings.Title(joinForeignKeys[idx])
    		}
    
    		ownFieldsMap[joinFieldName] = ownField
    		fieldsMap[joinFieldName] = ownField
    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)
  4. tests/serializer_test.go

    	if DB.Dialector.Name() == "postgres" {
    		sps := SerializerPostgresStruct(*s)
    		return &sps
    	}
    	return s
    }
    
    type Roles []string
    
    type Job struct {
    	Title    string
    	Number   int
    	Location string
    	IsIntern bool
    }
    
    type EncryptedString string
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 21 14:09:38 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  5. internal/s3select/sql/jsonpath_test.go

    	}
    
    	p := participle.MustBuild(
    		&JSONPath{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    	)
    	cases := []struct {
    		str string
    		res []interface{}
    	}{
    		{"s.title", []interface{}{"Murder on the Orient Express", "The Robots of Dawn", "Pigs Have Wings"}},
    		{"s.authorInfo.yearRange", []interface{}{[]interface{}{1890.0, 1976.0}, []interface{}{1920.0, 1992.0}, []interface{}{1881.0, 1975.0}}},
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  6. tests/embedded_struct_test.go

    		}
    	}
    
    	// save embedded struct
    	DB.Save(&HNPost{BasePost: BasePost{Title: "news"}})
    	DB.Save(&HNPost{BasePost: BasePost{Title: "hn_news"}})
    	var news HNPost
    	if err := DB.First(&news, "title = ?", "hn_news").Error; err != nil {
    		t.Errorf("no error should happen when query with embedded struct, but got %v", err)
    	} else if news.Title != "hn_news" {
    		t.Errorf("embedded struct's value should be scanned correctly")
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  7. internal/s3select/select_test.go

    }
    
    func TestJSONQueries(t *testing.T) {
    	input := `{"id": 0,"title": "Test Record","desc": "Some text","synonyms": ["foo", "bar", "whatever"]}
    	{"id": 1,"title": "Second Record","desc": "another text","synonyms": ["some", "synonym", "value"]}
    	{"id": 2,"title": "Second Record","desc": "another text","numbers": [2, 3.0, 4]}
    	{"id": 3,"title": "Second Record","desc": "another text","nested": [[2, 3.0, 4], [7, 8.5, 9]]}`
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 76.2K bytes
    - Viewed (0)
  8. src/bytes/example_test.go

    }
    
    func ExampleSplitAfterN() {
    	fmt.Printf("%q\n", bytes.SplitAfterN([]byte("a,b,c"), []byte(","), 2))
    	// Output: ["a," "b,c"]
    }
    
    func ExampleTitle() {
    	fmt.Printf("%s", bytes.Title([]byte("her royal highness")))
    	// Output: Her Royal Highness
    }
    
    func ExampleToTitle() {
    	fmt.Printf("%s\n", bytes.ToTitle([]byte("loud noises")))
    	fmt.Printf("%s\n", bytes.ToTitle([]byte("хлеб")))
    	// Output:
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  9. src/bytes/bytes.go

    	return unicode.IsSpace(r)
    }
    
    // Title treats s as UTF-8-encoded bytes and returns a copy with all Unicode letters that begin
    // words mapped to their title case.
    //
    // Deprecated: The rule Title uses for word boundaries does not handle Unicode
    // punctuation properly. Use golang.org/x/text/cases instead.
    func Title(s []byte) []byte {
    	// Use a closure here to remember state.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  10. src/bytes/bytes_test.go

    	{"unicode \xe2\x80\xa8 line separator", "Unicode \xe2\x80\xa8 Line Separator"},
    }
    
    func TestTitle(t *testing.T) {
    	for _, tt := range TitleTests {
    		if s := string(Title([]byte(tt.in))); s != tt.out {
    			t.Errorf("Title(%q) = %q, want %q", tt.in, s, tt.out)
    		}
    	}
    }
    
    var ToTitleTests = []TitleTest{
    	{"", ""},
    	{"a", "A"},
    	{" aaa aaa aaa ", " AAA AAA AAA "},
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top