Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add InsertBatch #3

Closed
wants to merge 1 commit into from
Closed

Conversation

saromanov
Copy link
Contributor

Hi! I just added simple extension to the API is Insert Batch method. So, Insert allows to add single object and Insert Batch is for add multiple objects.
Part of the code:

obj1 := &TestObject{
    ID:  "my-cool-thing",
    Foo: "abc",
}
obj2 := &TestObject{
    ID:  "my-other-cool-thing",
    Foo: "xyz",
}
obj3 := &TestObject{
    ID:  "yet-another-cool-thing",
    Foo: "xyb",
}

err := txn.InsertBatch("main", obj1, obj2, obj3)
if err != nil {
    panic(err)
}

@armon
Copy link
Member

armon commented Nov 8, 2015

There is no real advantage over just calling Insert multiple times, so for the sake of API simplicity I'm closing this.

@armon armon closed this Nov 8, 2015
absolutelightning added a commit that referenced this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants