Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for is_full (0.36 sec)

  1. internal/store/batch.go

    func (b *Batch[K, T]) Len() int {
    	b.Lock()
    	defer b.Unlock()
    
    	return len(b.keys)
    }
    
    // IsFull checks if the batch is full or not
    func (b *Batch[K, T]) IsFull() bool {
    	b.Lock()
    	defer b.Unlock()
    
    	return b.isFull()
    }
    
    func (b *Batch[K, T]) isFull() bool {
    	return len(b.items) >= int(b.limit)
    }
    
    // NewBatch creates a new batch
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/transition.go

    	return t.Date.Time.IsZero()
    }
    
    // IsNull returns true if both date and days fields are null
    func (t Transition) IsNull() bool {
    	return t.StorageClass == ""
    }
    
    // NextDue returns upcoming transition date for obj and true if applicable,
    // returns false otherwise.
    func (t Transition) NextDue(obj ObjectOpts) (time.Time, bool) {
    	if !obj.IsLatest || t.IsNull() {
    		return time.Time{}, false
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 10 17:07:49 GMT 2022
    - 5.1K bytes
    - Viewed (0)
  3. internal/store/batch_test.go

    		}
    	}
    	err := batch.Add(101, 101)
    	if err == nil || !errors.Is(err, ErrBatchFull) {
    		t.Fatalf("Expected err %v but got %v", ErrBatchFull, err)
    	}
    	if !batch.IsFull() {
    		t.Fatal("Expected batch.IsFull to be true but got false")
    	}
    	batchLen := batch.Len()
    	if batchLen != int(limit) {
    		t.Fatalf("expected batch length to be %v but got %v", limit, batchLen)
    	}
    	keys, items, err := batch.GetAll()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle-handlers.go

    			// original rule had expiry that is no longer in the new config,
    			// or rule is present but missing expiration flags
    			if (!rl.Expiration.IsNull() || !rl.NoncurrentVersionExpiration.IsNull()) &&
    				(!ok || (updRule.Expiration.IsNull() && updRule.NoncurrentVersionExpiration.IsNull())) {
    				expiryRuleRemoved = true
    			}
    		}
    	}
    
    	if bucketLifecycle.HasExpiry() || expiryRuleRemoved {
    		currtime := time.Now()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 7K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/noncurrentversion.go

    		NoncurrentDays:          val.NoncurrentDays,
    		NewerNoncurrentVersions: val.NewerNoncurrentVersions,
    	}
    	n.set = true
    	return nil
    }
    
    // IsNull returns if both NoncurrentDays and NoncurrentVersions are empty
    func (n NoncurrentVersionExpiration) IsNull() bool {
    	return n.IsDaysNull() && n.NewerNoncurrentVersions == 0
    }
    
    // IsDaysNull returns true if days field is null
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Dec 14 17:41:44 GMT 2021
    - 5.3K bytes
    - Viewed (1)
  6. internal/bucket/lifecycle/expiration.go

    	return e.Days == ExpirationDays(0)
    }
    
    // IsDateNull returns true if date field is null
    func (e Expiration) IsDateNull() bool {
    	return e.Date.Time.IsZero()
    }
    
    // IsNull returns true if both date and days fields are null
    func (e Expiration) IsNull() bool {
    	return e.IsDaysNull() && e.IsDateNull()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 21 20:28:34 GMT 2024
    - 6.6K bytes
    - Viewed (1)
  7. internal/s3select/json/record.go

    		v = f
    	} else if i, ok := value.ToInt(); ok {
    		v = i
    	} else if t, ok := value.ToTimestamp(); ok {
    		v = sql.FormatSQLTimestamp(t)
    	} else if s, ok := value.ToString(); ok {
    		v = s
    	} else if value.IsNull() {
    		v = nil
    	} else if value.IsMissing() {
    		return r, nil
    	} else if b, ok := value.ToBytes(); ok {
    		// This can either be raw json or a CSV value.
    		// Only treat objects and arrays as JSON.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  8. internal/s3select/sql/aggregation.go

    		if err != nil {
    			return err
    		}
    	} else {
    		// Evaluate the (only) argument
    		val, err = e.SFunc.ArgsList[0].evalNode(r, tableAlias)
    		if err != nil {
    			return err
    		}
    	}
    
    	if val.IsNull() {
    		// E.g. the column or field does not exist in the
    		// record - in all such cases the aggregation is not
    		// updated.
    		return nil
    	}
    
    	argVal := val
    	if funcName != aggFnCount {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 7.9K bytes
    - Viewed (0)
Back to top