- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for UniqueIndex (0.16 sec)
-
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;"`
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
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"` }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
schema/index.go
// ParseIndexes parse schema indexes func (schema *Schema) ParseIndexes() map[string]Index { indexes := map[string]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 := indexes[index.Name] idx.Name = index.Name
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K 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()
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 2.2K 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 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1) -
guava-tests/test/com/google/common/collect/FluentIterableTest.java
public void testUniqueIndex_nullKey() { try { fluent(1, 2, 3).uniqueIndex(Functions.constant(null)); fail(); } catch (NullPointerException expected) { } } public void testUniqueIndex_nullValue() { try { ImmutableMap<Object, Integer> unused = fluent(1, null, 2) .uniqueIndex( new Function<Integer, Object>() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 18:35:19 GMT 2024 - 31.1K 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 := strings.Title(relation.FieldSchema.Name) + relField.Name if _, ok := ownFieldsMap[joinFieldName]; ok {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 22.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MapsTest.java
ImmutableMap<Integer, String> outputMap = Maps.uniqueIndex(INT_TO_STRING_MAP.values(), Functions.forMap(INT_TO_STRING_MAP.inverse())); assertEquals(INT_TO_STRING_MAP, outputMap); } public void testUniqueIndexIterable() { ImmutableMap<Integer, String> outputMap = Maps.uniqueIndex( new Iterable<String>() { @Override
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Mar 04 16:06:01 GMT 2024 - 67.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MapsTest.java
ImmutableMap<Integer, String> outputMap = Maps.uniqueIndex(INT_TO_STRING_MAP.values(), Functions.forMap(INT_TO_STRING_MAP.inverse())); assertEquals(INT_TO_STRING_MAP, outputMap); } public void testUniqueIndexIterable() { ImmutableMap<Integer, String> outputMap = Maps.uniqueIndex( new Iterable<String>() { @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Mar 04 16:06:01 GMT 2024 - 64.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. *
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Tue Jan 30 00:14:39 GMT 2024 - 35.3K bytes - Viewed (0)