- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for index (0.2 sec)
-
schema/index.go
}) indexes[index.Name] = idx } } } for _, index := range indexes { if index.Class == "UNIQUE" && len(index.Fields) == 1 { index.Fields[0].Field.UniqueIndex = index.Name } } return indexes } func (schema *Schema) LookIndex(name string) *Index { if schema != nil { indexes := schema.ParseIndexes() for _, index := range indexes { if index.Name == name { return &index
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
migrator/index.go
import "database/sql" // Index implements gorm.Index interface type Index struct { TableName string NameValue string ColumnList []string PrimaryKeyValue sql.NullBool UniqueValue sql.NullBool OptionValue string } // Table return the table name of the index. func (idx Index) Table() string { return idx.TableName } // Name return the name of the index. func (idx Index) Name() string {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Apr 11 02:32:46 GMT 2023 - 1023 bytes - Viewed (0) -
schema/index_test.go
OID int64 `gorm:"index:idx_id;index:idx_oid,unique"` MemberNumber string `gorm:"index:idx_id,priority:1"` Name7 string `gorm:"index:type"` Name8 string `gorm:"index:,length:10;index:,collate:utf8"` // Composite Index: Flattened structure. Data0A string `gorm:"index:,composite:comp_id0"` Data0B string `gorm:"index:,composite:comp_id0"`
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
schema/utils.go
switch result.Kind() { case reflect.Struct: reflectResults = reflect.Append(reflectResults, result.Addr()) case reflect.Slice, reflect.Array: for i := 0; i < result.Len(); i++ { if elem := result.Index(i); elem.Kind() == reflect.Ptr { reflectResults = reflect.Append(reflectResults, elem) } else { reflectResults = reflect.Append(reflectResults, elem.Addr()) } } } } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Aug 19 13:35:14 GMT 2023 - 5.5K bytes - Viewed (0) -
callbacks/callmethod.go
switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ { if value := reflect.Indirect(db.Statement.ReflectValue.Index(i)); value.CanAddr() { fc(value.Addr().Interface(), tx) } else { db.AddError(gorm.ErrInvalidValue) return } db.Statement.CurDestIndex++ } case reflect.Struct:
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 846 bytes - Viewed (0) -
callbacks/associations.go
distinctElems := reflect.MakeSlice(reflect.SliceOf(fieldType), 0, 10) identityMap := map[string]bool{} for i := 0; i < rValLen; i++ { obj := db.Statement.ReflectValue.Index(i) if reflect.Indirect(obj).Kind() != reflect.Struct { break } if _, zero := rel.Field.ValueOf(db.Statement.Context, obj); !zero { // check belongs to relation value
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Apr 11 03:06:13 GMT 2023 - 14.3K bytes - Viewed (0) -
migrator/migrator.go
} results = append(results, clause.Expr{SQL: str}) } return } // BuildIndexOptionsInterface build index options interface type BuildIndexOptionsInterface interface { BuildIndexOptions([]schema.IndexOption, *gorm.Statement) []interface{} } // CreateIndex create index `name` func (m Migrator) CreateIndex(value interface{}, name string) error { return m.RunWithValue(value, func(stmt *gorm.Statement) error {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
clause/expression.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Oct 10 06:45:48 GMT 2023 - 8.3K bytes - Viewed (0) -
callbacks/preload.go
reflectValue.SetLen(rv.Len()) for i := 0; i < rv.Len(); i++ { frv := rel.Field.ReflectValueOf(db.Statement.Context, rv.Index(i)) if frv.Kind() != reflect.Ptr { reflectValue.Index(i).Set(frv.Addr()) } else { reflectValue.Index(i).Set(frv) } } tx := preloadDB(db, reflectValue, reflectValue.Interface())
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 11.6K bytes - Viewed (0) -
README.md
* Developer Friendly ## Getting Started * GORM Guides [https://gorm.io](https://gorm.io) * Gen Guides [https://gorm.io/gen/index.html](https://gorm.io/gen/index.html) ## Contributing [You can help to deliver a better GORM, check out things you can do](https://gorm.io/contribute.html) ## Contributors [Thank you](https://github.com/go-gorm/gorm/graphs/contributors) for contributing to the GORM framework!
Plain Text - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Nov 07 02:20:06 GMT 2023 - 1.8K bytes - Viewed (0)