FindInBatches using Offset instead of PrimaryKey iterations
This commit is contained in:
parent
fae7229d9e
commit
003708f020
@ -167,7 +167,7 @@ func (db *DB) Find(dest interface{}, conds ...interface{}) (tx *DB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FindInBatches find records in batches
|
// FindInBatches find records in batches
|
||||||
func (db *DB) FindInBatch(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) *DB {
|
func (db *DB) FindInBatches(dest interface{}, batchSize int, fc func(tx *DB, batch int) error) *DB {
|
||||||
var (
|
var (
|
||||||
tx = db.Session(&Session{})
|
tx = db.Session(&Session{})
|
||||||
queryDB = tx
|
queryDB = tx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user