- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for title (0.14 sec)
-
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 May 05 09:35:13 GMT 2024 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Viewed (3) -
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 May 05 09:35:13 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
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 May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 5.2K bytes - Viewed (0) -
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 May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 2.8K bytes - Viewed (0) -
internal/s3select/sql/parser_test.go
participle.Lexer(sqlLexer), participle.CaseInsensitive("Keyword"), participle.CaseInsensitive("Timeword"), ) j := JSONPath{} cases := []string{ "S3Object", "S3Object.id", "S3Object.book.title", "S3Object.id[1]", "S3Object.id['abc']", "S3Object.id['ab']", "S3Object.words.*.id", "S3Object.words.name[*].val", "S3Object.words.name[*].val[*]", "S3Object.words.name[*].val.*", }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 9.2K bytes - Viewed (0) -
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 May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 21 14:09:38 GMT 2023 - 7.6K bytes - Viewed (0)