Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for IsZero (0.07 sec)

  1. callbacks/create.go

    							break
    						}
    
    						if _, isZero := pkField.ValueOf(db.Statement.Context, rv); isZero {
    							db.AddError(pkField.Set(db.Statement.Context, rv, insertID))
    							insertID += pkField.AutoIncrementIncrement
    						}
    					}
    				}
    			case reflect.Struct:
    				_, isZero := pkField.ValueOf(db.Statement.Context, db.Statement.ReflectValue)
    				if isZero {
    Registered: 2024-11-03 09:35
    - Last Modified: 2024-04-08 03:29
    - 12.5K bytes
    - Viewed (0)
  2. callbacks/update.go

    			if size := stmt.ReflectValue.Len(); size > 0 {
    				var isZero bool
    				for i := 0; i < size; i++ {
    					for _, field := range stmt.Schema.PrimaryFields {
    						_, isZero = field.ValueOf(stmt.Context, stmt.ReflectValue.Index(i))
    						if !isZero {
    							break
    						}
    					}
    				}
    
    				if !isZero {
    Registered: 2024-11-03 09:35
    - Last Modified: 2024-03-18 05:44
    - 9.4K bytes
    - Viewed (0)
  3. cmd/bucket-metadata.go

    		b.QuotaConfigUpdatedAt = b.Created
    	}
    
    	if b.ReplicationConfigUpdatedAt.IsZero() {
    		b.ReplicationConfigUpdatedAt = b.Created
    	}
    
    	if b.VersioningConfigUpdatedAt.IsZero() {
    		b.VersioningConfigUpdatedAt = b.Created
    	}
    
    	if b.LifecycleConfigUpdatedAt.IsZero() {
    		b.LifecycleConfigUpdatedAt = b.Created
    	}
    
    	if b.NotificationConfigUpdatedAt.IsZero() {
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-08-28 15:32
    - 18.2K bytes
    - Viewed (0)
  4. internal/bucket/lifecycle/lifecycle.go

    func (lc Lifecycle) eval(obj ObjectOpts, now time.Time) Event {
    	var events []Event
    	if obj.ModTime.IsZero() {
    		return Event{}
    	}
    
    	// Handle expiry of restored object; NB Restored Objects have expiry set on
    	// them as part of RestoreObject API. They aren't governed by lifecycle
    	// rules.
    	if !obj.RestoreExpires.IsZero() && now.After(obj.RestoreExpires) {
    		action := DeleteRestoredAction
    		if !obj.IsLatest {
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-05-23 01:12
    - 17.9K bytes
    - Viewed (0)
  5. cmd/object-handlers-common.go

    	if r.Method != http.MethodPut {
    		return false
    	}
    	// If the object doesn't have a modtime (IsZero), or the modtime
    	// is obviously garbage (Unix time == 0), then ignore modtimes
    	// and don't process the If-Modified-Since header.
    	if objInfo.ModTime.IsZero() || objInfo.ModTime.Equal(time.Unix(0, 0)) {
    		return false
    	}
    
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-09-03 06:33
    - 15.3K bytes
    - Viewed (0)
  6. cmd/site-replication.go

    				var hasBucket, isBucketMarkedDeleted bool
    
    				bi, ok := sris[dIdx].Buckets[s.Bucket]
    				if ok {
    					isBucketMarkedDeleted = !bi.DeletedAt.IsZero() && (bi.CreatedAt.IsZero() || bi.DeletedAt.After(bi.CreatedAt))
    					hasBucket = !bi.CreatedAt.IsZero()
    				}
    				quotaCfgSet := hasBucket && quotaCfgs[i] != nil && *quotaCfgs[i] != madmin.BucketQuota{}
    				ss := madmin.SRBucketStatsSummary{
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-08-15 12:04
    - 185.1K bytes
    - Viewed (0)
  7. schema/utils.go

    	for _, rel := range rels {
    		reflectResults = reflect.MakeSlice(reflect.SliceOf(reflect.PtrTo(rel.FieldSchema.ModelType)), 0, 1)
    
    		appendToResults := func(value reflect.Value) {
    			if _, isZero := rel.Field.ValueOf(ctx, value); !isZero {
    				result := reflect.Indirect(rel.Field.ReflectValueOf(ctx, value))
    				switch result.Kind() {
    				case reflect.Struct:
    					reflectResults = reflect.Append(reflectResults, result.Addr())
    Registered: 2024-11-03 09:35
    - Last Modified: 2023-08-19 13:35
    - 5.5K bytes
    - Viewed (0)
  8. logger/sql.go

    		switch v := v.(type) {
    		case bool:
    			vars[idx] = strconv.FormatBool(v)
    		case time.Time:
    			if v.IsZero() {
    				vars[idx] = escaper + tmFmtZero + escaper
    			} else {
    				vars[idx] = escaper + v.Format(tmFmtWithMS) + escaper
    			}
    		case *time.Time:
    			if v != nil {
    				if v.IsZero() {
    					vars[idx] = escaper + tmFmtZero + escaper
    				} else {
    					vars[idx] = escaper + v.Format(tmFmtWithMS) + escaper
    Registered: 2024-11-03 09:35
    - Last Modified: 2024-03-21 08:00
    - 5K bytes
    - Viewed (0)
  9. cmd/erasure-coding.go

    // It only decodes the data blocks but does not verify them.
    // It returns an error if the decoding failed.
    func (e *Erasure) DecodeDataBlocks(data [][]byte) error {
    	isZero := 0
    	for _, b := range data {
    		if len(b) == 0 {
    			isZero++
    			break
    		}
    	}
    	if isZero == 0 || isZero == len(data) {
    		// If all are zero, payload is 0 bytes.
    		return nil
    	}
    	return e.encoder().ReconstructData(data)
    }
    
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-01-31 02:11
    - 8.6K bytes
    - Viewed (0)
  10. cmd/metrics-v3-cluster-usage.go

    	dataUsageInfo, err := c.dataUsageInfo.Get()
    	if err != nil {
    		metricsLogIf(ctx, err)
    		return nil
    	}
    
    	// data usage has not captured any data yet.
    	if dataUsageInfo.LastUpdate.IsZero() {
    		return nil
    	}
    
    	var (
    		clusterSize               uint64
    		clusterBuckets            uint64
    		clusterObjectsCount       uint64
    		clusterVersionsCount      uint64
    		clusterDeleteMarkersCount uint64
    	)
    Registered: 2024-11-03 19:28
    - Last Modified: 2024-07-14 18:11
    - 6.5K bytes
    - Viewed (0)
Back to top