Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for tool (0.17 sec)

  1. migrator/index.go

    }
    
    // PrimaryKey returns the index is primary key or not.
    func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) {
    	return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid
    }
    
    // Unique returns whether the index is unique or not.
    func (idx Index) Unique() (unique bool, ok bool) {
    	return idx.UniqueValue.Bool, idx.UniqueValue.Valid
    }
    
    // Option return the optional attribute of the index
    func (idx Index) Option() string {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 02:32:46 GMT 2023
    - 1023 bytes
    - Viewed (0)
  2. schema/index.go

    					idx.Comment = index.Comment
    				}
    				if idx.Option == "" {
    					idx.Option = index.Option
    				}
    
    				idx.Fields = append(idx.Fields, index.Fields...)
    				sort.Slice(idx.Fields, func(i, j int) bool {
    					return idx.Fields[i].priority < idx.Fields[j].priority
    				})
    
    				indexes[index.Name] = idx
    			}
    		}
    	}
    	for _, index := range indexes {
    		if index.Class == "UNIQUE" && len(index.Fields) == 1 {
    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)
Back to top