Skip to content

.add getGeneratedKeys to provide ability to get batch insert's keys.#12

Open
johnhx wants to merge 1 commit into
BriteSnow:masterfrom
johnhx:johnhx_add_get_generated_keys
Open

.add getGeneratedKeys to provide ability to get batch insert's keys.#12
johnhx wants to merge 1 commit into
BriteSnow:masterfrom
johnhx:johnhx_add_get_generated_keys

Conversation

@johnhx

@johnhx johnhx commented May 6, 2017

Copy link
Copy Markdown

Changelist:

  • Add getGeneratedKeys API to provide ability to get batch insert's keys;
  • Fix some UT failures.

@jeremychone

Copy link
Copy Markdown
Contributor

@johnhx thank you for the addition, I like it. The one thing I am going to change is to not store the batchResult in the runner and provide the generatedKeys as a return of execBatch as we do for returning id on insert.

I will let you know when I add this feature. Will try to do it today.

Hope this makes sense. Feel free to let me know if I missed something.

@johnhx

johnhx commented May 6, 2017 via email

Copy link
Copy Markdown
Author

@jeremychone

Copy link
Copy Markdown
Contributor

@johnhx Cool, the requirement make sense, I will make couple of changes to fit into the api patterns. Did not have time to do it yesterday, so, will try to come around this week.

Btw, do you know that in the insert or update queries, you can do a .returningId... which will return the keys. But this might not cover the batch, I need to check.

Also, getting the standard getGeneratedKeys might be helpful.

@johnhx

johnhx commented May 8, 2017

Copy link
Copy Markdown
Author

@jeremychone yes, I got to know .returningId which works for insert or update.

@jeremychone jeremychone modified the milestone: j8ql-0.5.7 Feb 12, 2018
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