Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for UnixMilli (0.24 sec)

  1. internal/cachevalue/cache.go

    // Tf the Update function returns an error the value is forwarded as is and not cached.
    func (t *Cache[T]) Get() (T, error) {
    	v := t.valErr.Load()
    	ttl := t.ttl
    	vTime := t.lastUpdateMs.Load()
    	tNow := time.Now().UnixMilli()
    	if v != nil && tNow-vTime < ttl.Milliseconds() {
    		if v.e == nil {
    			return v.v, nil
    		}
    		if v.e != nil && t.opts.CacheError || t.opts.ReturnLastGood {
    			return v.v, v.e
    		}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. callbacks/update.go

    						} else if field.AutoUpdateTime == schema.UnixMillisecond {
    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.UnixMilli()})
    						} else if field.AutoUpdateTime == schema.UnixSecond {
    							set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.Unix()})
    						} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  3. tests/embedded_struct_test.go

    	}
    
    	if hnPost.Author.ContentPtr != nil {
    		t.Errorf("Expected to get nil Author contentPtr but got: %v", hnPost.Author.ContentPtr)
    	}
    
    	if NewPost.Author.Birthday.UnixMilli() != hnPost.Author.Birthday.UnixMilli() {
    		t.Errorf("Expected to get Author birthday with %+v but got: %+v", NewPost.Author.Birthday, hnPost.Author.Birthday)
    	}
    
    	if hnPost.Author.BirthdayPtr != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  4. schema/field.go

    					field.ReflectValueOf(ctx, value).SetInt(data.UnixNano())
    				} else if field.AutoCreateTime == UnixMillisecond || field.AutoUpdateTime == UnixMillisecond {
    					field.ReflectValueOf(ctx, value).SetInt(data.UnixMilli())
    				} else {
    					field.ReflectValueOf(ctx, value).SetInt(data.Unix())
    				}
    			case *time.Time:
    				if data != nil {
    					if field.AutoCreateTime == UnixNanosecond || field.AutoUpdateTime == UnixNanosecond {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  5. api/go1.17.txt

    pkg time, const Layout ideal-string
    pkg time, func UnixMicro(int64) Time
    pkg time, func UnixMilli(int64) Time
    pkg time, method (Time) GoString() string
    pkg time, method (Time) IsDST() bool
    pkg time, method (Time) UnixMicro() int64
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Fri Feb 17 20:31:46 GMT 2023
    - 18K bytes
    - Viewed (0)
  6. callbacks/create.go

    									switch field.AutoUpdateTime {
    									case schema.UnixNanosecond:
    										assignment.Value = curTime.UnixNano()
    									case schema.UnixMillisecond:
    										assignment.Value = curTime.UnixMilli()
    									case schema.UnixSecond:
    										assignment.Value = curTime.Unix()
    									}
    
    									onConflict.DoUpdates = append(onConflict.DoUpdates, assignment)
    								} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top