Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 10 for uniqueindex (0.26 seconds)

  1. guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertThrows(
            NullPointerException.class, () -> fluent(1, 2, 3).uniqueIndex(Functions.constant(null)));
      }
    
      public void testUniqueIndex_nullValue() {
        assertThrows(
            NullPointerException.class,
            () -> {
              ImmutableMap<Object, Integer> unused =
                  fluent(1, null, 2)
                      .uniqueIndex(
                          new Function<Integer, Object>() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 31.2K bytes
    - Click Count (0)
  2. 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 {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Nov 22 03:14:36 GMT 2025
    - 32.2K bytes
    - Click Count (0)
  3. 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
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sun Nov 16 04:11:05 GMT 2025
    - 23.1K bytes
    - Click Count (1)
  4. migrator/migrator.go

    	unique, ok := columnType.Unique()
    	if !ok || field.PrimaryKey {
    		return nil // skip primary key
    	}
    	// By default, ColumnType's Unique is not affected by UniqueIndex, so we don't care about UniqueIndex.
    	return m.RunWithValue(value, func(stmt *gorm.Statement) error {
    		// We're currently only receiving boolean values on `Unique` tag,
    		// so the UniqueConstraint name is fixed
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:49:01 GMT 2026
    - 29.8K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/Maps.java

       * @since 10.0
       */
      @CanIgnoreReturnValue
      public static <K, V> ImmutableMap<K, V> uniqueIndex(
          Iterator<V> values, Function<? super V, K> keyFunction) {
        return uniqueIndex(values, keyFunction, ImmutableMap.builder());
      }
    
      private static <K, V> ImmutableMap<K, V> uniqueIndex(
          Iterator<V> values, Function<? super V, K> keyFunction, ImmutableMap.Builder<K, V> builder) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 157.6K bytes
    - Click Count (0)
  6. guava/src/com/google/common/collect/Maps.java

       * @since 10.0
       */
      @CanIgnoreReturnValue
      public static <K, V> ImmutableMap<K, V> uniqueIndex(
          Iterator<V> values, Function<? super V, K> keyFunction) {
        return uniqueIndex(values, keyFunction, ImmutableMap.builder());
      }
    
      private static <K, V> ImmutableMap<K, V> uniqueIndex(
          Iterator<V> values, Function<? super V, K> keyFunction, ImmutableMap.Builder<K, V> builder) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 163.4K bytes
    - Click Count (0)
  7. 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.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  8. 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.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  9. 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"`
    		}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:49:01 GMT 2026
    - 66.3K bytes
    - Click Count (0)
  10. 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 63.2K bytes
    - Click Count (0)
Back to Top