Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for find_in_batches (0.08 sec)

  1. tests/query_test.go

    	}
    }
    
    func TestFindInBatches(t *testing.T) {
    	users := []User{
    		*GetUser("find_in_batches", Config{}),
    		*GetUser("find_in_batches", Config{}),
    		*GetUser("find_in_batches", Config{}),
    		*GetUser("find_in_batches", Config{}),
    		*GetUser("find_in_batches", Config{}),
    		*GetUser("find_in_batches", Config{}),
    	}
    
    	DB.Create(&users)
    
    	var (
    		results    []User
    		totalBatch int
    	)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  2. finisher_api.go

    			tx.Statement.AddClause(clause.Where{Exprs: exprs})
    		}
    	}
    	tx.Statement.Dest = dest
    	return tx.callbacks.Query().Execute(tx)
    }
    
    // FindInBatches finds all records in batches of batchSize
    func (db *DB) FindInBatches(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) *DB {
    	var (
    		tx = db.Order(clause.OrderByColumn{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 22.8K bytes
    - Viewed (0)
Back to top