Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for AUTOCREATETIME (0.18 sec)

  1. schema/field.go

    	}
    
    	if v, ok := field.TagSettings["AUTOCREATETIME"]; (ok && utils.CheckTruth(v)) || (!ok && field.Name == "CreatedAt" && (field.DataType == Time || field.DataType == Int || field.DataType == Uint)) {
    		if field.DataType == Time {
    			field.AutoCreateTime = UnixTime
    		} else if strings.ToUpper(v) == "NANO" {
    			field.AutoCreateTime = UnixNanosecond
    		} else if strings.ToUpper(v) == "MILLI" {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  2. callbacks/create.go

    		for _, db := range stmt.Schema.DBNames {
    			if field := stmt.Schema.FieldsByDBName[db]; !field.HasDefaultValue || field.DefaultValueInterface != nil {
    				if v, ok := selectColumns[db]; (ok && v) || (!ok && (!restricted || field.AutoCreateTime > 0 || field.AutoUpdateTime > 0)) {
    					values.Columns = append(values.Columns, clause.Column{Name: db})
    				}
    			}
    		}
    
    		switch stmt.ReflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 08 03:29:55 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  3. tests/customize_field_test.go

    		FieldAllowSave3         string `gorm:"->:false;<-:create"`
    		FieldReadonly           string `gorm:"->"`
    		FieldIgnore             string `gorm:"-"`
    		AutoUnixCreateTime      int32  `gorm:"autocreatetime"`
    		AutoUnixMilliCreateTime int    `gorm:"autocreatetime:milli"`
    		AutoUnixNanoCreateTime  int64  `gorm:"autocreatetime:nano"`
    		AutoUnixUpdateTime      uint32 `gorm:"autoupdatetime"`
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Sep 11 09:33:31 UTC 2020
    - 6.9K bytes
    - Viewed (0)
Back to top