- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for UNIQUEINDEX (1.34 sec)
-
tests/migrate_test.go
} if field.UniqueIndex != uniqueIndex { t.Fatalf("%v: %q column %q uniqueIndex should be %v but got %v", utils.FileWithLineNum(), stmt.Schema, fieldName, uniqueIndex, field.UniqueIndex) } } type ( // not unique UniqueStruct1 struct { Name string `gorm:"size:10"` }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 65.2K bytes - Viewed (0) -
schema/constraint_test.go
) } } } } func TestParseUniqueConstraints(t *testing.T) { type UserUnique struct { Name1 string `gorm:"unique"` Name2 string `gorm:"uniqueIndex"` } user, err := schema.Parse(&UserUnique{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user unique, got error %v", err) } constraints := user.ParseUniqueConstraints()
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 2.2K bytes - Viewed (0) -
schema/index_test.go
FieldC string `gorm:"index:,unique"` // uniqueIndex FieldD string `gorm:"uniqueIndex;index"` // uniqueIndex and index FieldE1 string `gorm:"uniqueIndex:uniq_field_e1_e2"` // mul uniqueIndex FieldE2 string `gorm:"uniqueIndex:uniq_field_e1_e2"` FieldF1 string `gorm:"uniqueIndex:uniq_field_f1_f2;index"` // mul uniqueIndex and index FieldF2 string `gorm:"uniqueIndex:uniq_field_f1_f2;"`
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Dec 06 02:27:44 UTC 2024 - 7.9K bytes - Viewed (0) -
schema/index.go
func (schema *Schema) ParseIndexes() []*Index { indexesByName := map[string]*Index{} indexes := []*Index{} for _, field := range schema.Fields { if field.TagSettings["INDEX"] != "" || field.TagSettings["UNIQUEINDEX"] != "" { fieldIndexes, err := parseFieldIndexes(field) if err != nil { schema.err = err break } for _, index := range fieldIndexes { idx := indexesByName[index.Name] if idx == nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed May 21 02:35:56 UTC 2025 - 3.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MapsMemoryBenchmark.java
* limitations under the License. */ package com.google.common.collect; import static com.google.common.base.Functions.toStringFunction; import static com.google.common.collect.Maps.uniqueIndex; import static java.util.Arrays.asList; import com.google.caliper.BeforeExperiment; import com.google.caliper.Benchmark; import com.google.caliper.Param; import com.google.caliper.api.Footprint;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 3.4K bytes - Viewed (0) -
schema/field.go
// In some db (e.g. MySQL), Unique and UniqueIndex are indistinguishable. // When a column has a (not Mul) UniqueIndex, Migrator always reports its gorm.ColumnType is Unique. // It causes field unnecessarily migration. // Therefore, we need to record the UniqueIndex on this column (exclude Mul UniqueIndex) for MigrateColumnUnique. UniqueIndex string } func (field *Field) BindName() string {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 32K bytes - Viewed (0) -
tests/associations_test.go
tidbSkip(t, "not support the foreign key feature") type Profile struct { ID uint Name string MemberID uint } type Member struct { ID uint Refer uint `gorm:"uniqueIndex"` Name string Profile Profile `gorm:"Constraint:OnUpdate:CASCADE,OnDelete:CASCADE;FOREIGNKEY:MemberID;References:Refer"` } DB.Migrator().DropTable(&Profile{}, &Member{})
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
schema/relationship.go
PkgPath: ownField.StructField.PkgPath, Type: ownField.StructField.Type, Tag: removeSettingFromTag(appendSettingFromTag(ownField.StructField.Tag, "primaryKey"), "column", "autoincrement", "index", "unique", "uniqueindex"), }) } for idx, relField := range refForeignFields { joinFieldName := cases.Title(language.Und, cases.NoLower).String(relation.FieldSchema.Name) + relField.Name
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1) -
android/guava/src/com/google/common/collect/FluentIterable.java
* @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final <K> ImmutableMap<K, @NonNull E> uniqueIndex(Function<? super E, K> keyFunction) { return Maps.uniqueIndex((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** * Returns an array containing all of the elements from this fluent iterable in iteration order. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 35.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/FluentIterable.java
* @since 14.0 */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final <K> ImmutableMap<K, @NonNull E> uniqueIndex(Function<? super E, K> keyFunction) { return Maps.uniqueIndex((Iterable<@NonNull E>) getDelegate(), keyFunction); } /** * Returns an array containing all of the elements from this fluent iterable in iteration order. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 34.8K bytes - Viewed (0)