Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for UniqueIndex (0.21 sec)

  1. 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)
  2. 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)
  3. 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 com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import com.google.caliper.api.Footprint;
    import com.google.common.collect.BenchmarkHelpers.BiMapImpl;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Dec 20 15:07:46 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  4. 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)
Back to top