good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
upper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
open
upper
Commits
1f397f81
Commit
1f397f81
authored
Aug 24, 2016
by
José Carlos Nieto
Browse files
Options
Downloads
Patches
Plain Diff
Rename NewBatch into Batch.
parent
6c2dd6ef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
internal/sqladapter/testing/adapter.go.tpl
+2
-2
2 additions, 2 deletions
internal/sqladapter/testing/adapter.go.tpl
lib/sqlbuilder/insert.go
+1
-1
1 addition, 1 deletion
lib/sqlbuilder/insert.go
lib/sqlbuilder/interfaces.go
+1
-1
1 addition, 1 deletion
lib/sqlbuilder/interfaces.go
with
4 additions
and
4 deletions
internal/sqladapter/testing/adapter.go.tpl
+
2
−
2
View file @
1f397f81
...
...
@@ -1086,7 +1086,7 @@ func TestBatchInsert(t *testing.T) {
err
:=
sess.Collection("artist").Truncate()
assert.NoError
(
t
,
err
)
batch
:=
sess.InsertInto("artist").Columns("name").
New
Batch(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").
New
Batch(batchSize)
batch
:=
sess.InsertInto("artist").Columns("name").Returning("id").Batch(batchSize)
go
func
()
{
defer
batch.Done
()
...
...
This diff is collapsed.
Click to expand it.
lib/sqlbuilder/insert.go
+
1
−
1
View file @
1f397f81
...
...
@@ -23,7 +23,7 @@ func (qi *inserter) clone() *inserter {
return
clone
}
func
(
qi
*
inserter
)
New
Batch
(
n
int
)
*
BatchInserter
{
func
(
qi
*
inserter
)
Batch
(
n
int
)
*
BatchInserter
{
return
newBatchInserter
(
qi
.
clone
(),
n
)
}
...
...
This diff is collapsed.
Click to expand it.
lib/sqlbuilder/interfaces.go
+
1
−
1
View file @
1f397f81
...
...
@@ -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.
New
Batch
(
size
int
)
*
BatchInserter
Batch
(
size
int
)
*
BatchInserter
// Execer provides the Exec method.
Execer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment