good morning!!!!

Skip to content
Snippets Groups Projects
Commit 1f397f81 authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Rename NewBatch into Batch.

parent 6c2dd6ef
Branches
Tags
No related merge requests found
......@@ -1086,7 +1086,7 @@ func TestBatchInsert(t *testing.T) {
err := sess.Collection("artist").Truncate()
assert.NoError(t, err)
batch := sess.InsertInto("artist").Columns("name").NewBatch(batchSize)
batch := sess.InsertInto("artist").Columns("name").Batch(batchSize)
totalItems := int(rand.Int31n(21))
......@@ -1126,7 +1126,7 @@ func TestBatchInsertReturningKeys(t *testing.T) {
batchSize, totalItems := 7, 12
batch := sess.InsertInto("artist").Columns("name").Returning("id").NewBatch(batchSize)
batch := sess.InsertInto("artist").Columns("name").Returning("id").Batch(batchSize)
go func() {
defer batch.Done()
......
......@@ -23,7 +23,7 @@ func (qi *inserter) clone() *inserter {
return clone
}
func (qi *inserter) NewBatch(n int) *BatchInserter {
func (qi *inserter) Batch(n int) *BatchInserter {
return newBatchInserter(qi.clone(), n)
}
......
......@@ -326,7 +326,7 @@ type Inserter interface {
// Batch provies a BatchInserter that can be used to insert many elements at
// once by issuing several calls to Values(). It accepts a size parameter
// which defines the batch size. If size is < 1, the batch size is set to 1.
NewBatch(size int) *BatchInserter
Batch(size int) *BatchInserter
// Execer provides the Exec method.
Execer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment