Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 103 for limit (0.15 sec)

  1. clause/limit.go

    // Limit limit clause
    type Limit struct {
    	Limit  *int
    	Offset int
    }
    
    // Name where clause name
    func (limit Limit) Name() string {
    	return "LIMIT"
    }
    
    // Build build where clause
    func (limit Limit) Build(builder Builder) {
    	if limit.Limit != nil && *limit.Limit >= 0 {
    		builder.WriteString("LIMIT ")
    		builder.AddVar(builder, *limit.Limit)
    	}
    	if limit.Offset > 0 {
    		if limit.Limit != nil && *limit.Limit >= 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 942 bytes
    - Viewed (0)
  2. clause/limit_test.go

    			"SELECT * FROM `users` LIMIT ?",
    			[]interface{}{limit0},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Limit: &limit0}, clause.Limit{Offset: 0}},
    			"SELECT * FROM `users` LIMIT ?",
    			[]interface{}{limit0},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{Offset: 20}},
    			"SELECT * FROM `users` OFFSET ?",
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  3. internal/store/batch_test.go

    	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()
    	if err != nil {
    		t.Fatalf("unable to get the items from the batch; %v", err)
    	}
    	if len(items) != int(limit) {
    		t.Fatalf("Expected length of the batch items to be %v but got %v", limit, len(items))
    	}
    	if len(keys) != int(limit) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  4. cmd/handler-api.go

    	if runtime.GOOS == "linux" {
    		// Useful in container mode
    		limit := cgroupMemLimit()
    		if limit > 0 {
    			// A valid value is found, return its 75%
    			available = (limit * 3) / 4
    			return
    		}
    	} // for all other platforms limits are based on virtual memory.
    
    	memStats, err := mem.VirtualMemory()
    	if err != nil {
    		return
    	}
    	// A valid value is available return its 75%
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  5. cmd/metacache-set.go

    	// used when o.Versioned is false
    	if !o.Versioned {
    		resolver.requestedVersions = 1
    	}
    	var limit int
    	if o.Limit > 0 && o.StopDiskAtLimit {
    		// Over-read by 4 + 1 for every 16 in limit to give some space for resolver,
    		// allow for truncating the list and know if we have more results.
    		limit = o.Limit + 4 + (o.Limit / 16)
    	}
    	ctxDone := ctx.Done()
    	return listPathRaw(ctx, listPathRawOptions{
    		disks:         disks,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 19:52:52 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  6. cmd/metacache-walk.go

    	// Should never contain a slash.
    	FilterPrefix string
    
    	// ForwardTo will forward to the given object path.
    	ForwardTo string
    
    	// Limit the number of returned objects if > 0.
    	Limit int
    
    	// DiskID contains the disk ID of the disk.
    	// Leave empty to not check disk ID.
    	DiskID string
    }
    
    // supported FS for Nlink optimization in readdir.
    const (
    	xfs  = "XFS"
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  7. internal/store/queuestore_test.go

    	// Ext for test item
    	testItemExt = ".test"
    )
    
    // Initialize the queue store.
    func setUpQueueStore(directory string, limit uint64) (Store[TestItem], error) {
    	queueStore := NewQueueStore[TestItem](queueDir, limit, testItemExt)
    	if oErr := queueStore.Open(); oErr != nil {
    		return nil, oErr
    	}
    	return queueStore, nil
    }
    
    // Tear down queue store.
    func tearDownQueueStore() error {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 04 17:52:24 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  8. internal/store/queuestore.go

    func NewQueueStore[I any](directory string, limit uint64, ext string) *QueueStore[I] {
    	if limit == 0 {
    		limit = defaultLimit
    	}
    
    	if ext == "" {
    		ext = defaultExt
    	}
    
    	return &QueueStore[I]{
    		directory:  directory,
    		entryLimit: limit,
    		fileExt:    ext,
    		entries:    make(map[string]int64, limit),
    	}
    }
    
    // Open - Creates the directory if not present.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  9. internal/store/batch.go

    	return b.isFull()
    }
    
    func (b *Batch[K, T]) isFull() bool {
    	return len(b.items) >= int(b.limit)
    }
    
    // NewBatch creates a new batch
    func NewBatch[K key, T any](limit uint32) *Batch[K, T] {
    	return &Batch[K, T]{
    		keys:  make([]K, 0, limit),
    		items: make(map[K]T, limit),
    		limit: limit,
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  10. tests/query_test.go

    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top