- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ParseTagSetting (0.12 sec)
-
schema/index.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 3.7K bytes - Viewed (0) -
schema/utils.go
package schema import ( "context" "fmt" "reflect" "regexp" "strings" "gorm.io/gorm/clause" "gorm.io/gorm/utils" ) var embeddedCacheKey = "embedded_cache_store" func ParseTagSetting(str string, sep string) map[string]string { settings := map[string]string{} names := strings.Split(str, sep) for i := 0; i < len(names); i++ { j := i if len(names[j]) > 0 { for {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
schema/schema_helper_test.go
t.Run("CheckField/"+f.Name, func(t *testing.T) { if fc != nil { fc(f) } if f.TagSettings == nil { if f.Tag != "" { f.TagSettings = schema.ParseTagSetting(f.Tag.Get("gorm"), ";") } else { f.TagSettings = map[string]string{} } } parsedField, ok := s.FieldsByDBName[f.DBName] if !ok { parsedField, ok = s.FieldsByName[f.Name] }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0) -
schema/field.go
} // ParseField parses reflect.StructField to Field func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field { var ( err error tagSetting = ParseTagSetting(fieldStruct.Tag.Get("gorm"), ";") ) field := &Field{ Name: fieldStruct.Name, DBName: tagSetting["COLUMN"], BindNames: []string{fieldStruct.Name},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0) -
schema/relationship.go
matched = false } } if matched { return nil } } } } var ( name string idx = strings.Index(str, ",") settings = ParseTagSetting(str, ",") ) // optimize match english letters and midline // The following code is basically called in for. // In order to avoid the performance problems caused by repeated compilation of regular expressions,
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0)