gocqlx icon indicating copy to clipboard operation
gocqlx copied to clipboard

Batch insert with list of structs

Open ajankovic opened this issue 5 years ago • 4 comments

Current example for batch insert https://github.com/scylladb/gocqlx/blob/master/example_test.go#L105 uses implementation with anonymous struct. This is something that is rarely used in practice.

What is actually needed is a way to iterate over items, add them to the batch builder and then also bind them with the items from the slice.

ajankovic avatar Aug 12 '19 13:08 ajankovic

Hi, are there any plans in the future for supporting this feature? Do you guys have an estimate for the 1.4 version?

miporto avatar Feb 24 '20 21:02 miporto

Hi @manuporto I'd be delighted to work more on 1.4 items but atm we are busy with other projects. ...

Anyway we accept PRs, if you can contribute this piece of work we are happy to merge and release it.

mmatczuk avatar Feb 25 '20 08:02 mmatczuk

The new Session API should support the Batch, the batch builder in qb should be removed.

mmatczuk avatar Apr 21 '20 12:04 mmatczuk

Great, thanks!

miporto avatar Apr 23 '20 16:04 miporto