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 values function to ease insertion of multiple columns worth of data #42

Merged
merged 2 commits into from
Mar 23, 2022

Conversation

mihaisoloi
Copy link
Collaborator

There are already tests for value which is a special case of values.

@mihaisoloi
Copy link
Collaborator Author

This is to handle: #41

@calvinlfer
Copy link
Member

calvinlfer commented Mar 22, 2022

Argh seems like 2.12.x doesn't have ListMap.from
https://github.com/kaizen-solutions/virgil/runs/5649226782?check_suite_focus=true#step:6:19

This should work and be just as efficient as what ListMap.from was doing:

val allColumns = column +: rest
val underlying: ListMap[String, ValueInCql] = {
  val acc         = ListMap.newBuilder[String, ValueInCql]
  val withColumns = acc ++= allColumns
  withColumns.result()
}
val columnsToAdd = BindMarkers.from(underlying)

@coveralls
Copy link
Collaborator

coveralls commented Mar 23, 2022

@calvinlfer calvinlfer merged commit f732b26 into kaizen-solutions:zio1 Mar 23, 2022
@calvinlfer
Copy link
Member

Awesome work 💪

@mihaisoloi mihaisoloi deleted the insertbuilder-values branch March 25, 2022 11:35
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.

3 participants