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

Batch DBMSProcessor fields insertion #5812

Merged
merged 4 commits into from
Jan 7, 2020

Conversation

abepolk
Copy link
Contributor

@abepolk abepolk commented Jan 2, 2020

In preparing for aggregating insertion of entries, I realized that aggregation of insertion into the FIELD table itself can be aggregated, since it is currently being done in a for loop. This can be done without aggregating entry insertion. The fix is in this PR, although I have not manually tested it.

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for bigger UI changes)
  • Checked documentation: Is the information available and up to date? If not: Issue created at https://github.com/JabRef/user-documentation/issues.

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The changes look good to me.

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this PR provides the basis for your next PR, I won't ask that my nitpicks are fixed. Please address them in your follow-up PR.

.append(") VALUES(?, ?, ?)");

try (PreparedStatement preparedFieldStatement = connection.prepareStatement(insertFieldQuery.toString())) {
// Coerce to ArrayList in order to use List.get()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this should be "Convert" instead of "Coerce"?

.append(", ")
.append(escape("VALUE"))
.append(") VALUES(?, ?, ?)");
// Number of commas is fields.size() - 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use the repeat() thing there, too?

BibEntry thirdEntry = getBibEntryExample3();
String thirdId = thirdEntry.getId();

// This must eventually be changed to insertEntries() once that method is implemented
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"eventually" is a false friend. Please translate it to "possibly" or "maybe"

@@ -311,6 +364,24 @@ private static BibEntry getBibEntryExample() {
.withCiteKey("nanoproc1994");
}

private static BibEntry getBibEntryExample2() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give the method a more meaningful name. For instance getShelahBibEntry.

@koppor koppor merged commit 2f5565b into JabRef:master Jan 7, 2020
@koppor
Copy link
Member

koppor commented Jan 8, 2020

I think, this updated broke our Oracle support: https://github.com/JabRef/jabref/runs/378669109

@NorwayMaple Do you fill capable to run Oracle in a Docker image and try to fix it? If not, I will remove Oracle support completely (and maybe will offer it on a paid basis). Then we also could use jOOQ (https://www.jooq.org/) which would make our code much more readable!

@abepolk
Copy link
Contributor Author

abepolk commented Jan 8, 2020

I'd be interested in trying to fix it. I'm not sure how long it will take, since I'm in the process of preparing for an all-day interview on Tuesday next week.

@koppor
Copy link
Member

koppor commented Jan 8, 2020

There is no time pressure! Good luck in preparing the interview!

@abepolk
Copy link
Contributor Author

abepolk commented Jan 17, 2020

This is my first time using Docker. I am on MacOS. Is there a recommended way to get started? For example, I could just use the same runner that GitHub does in the link you posted. Thanks!

@koppor
Copy link
Member

koppor commented Jan 17, 2020

Yes, you can use the same runner. Note that you need to download the required RPM from Oracle (due to terrr°rrist protection)

@abepolk
Copy link
Contributor Author

abepolk commented Jan 17, 2020

Moving this conversation to my new PR #5837

koppor pushed a commit that referenced this pull request Jan 1, 2022
f78c707 Update Turabian (full note) for 17.1.3.2 Reprint Editions (#5809)
2169ddc Create art-libraries-society-of-north-america-arlisna-reviews.csl (#5791)
94119a6 Create university-of-south-wales-harvard.csl (#5787)
470925c Update fachhochschule-sudwestfalen.csl (#5811)
1a9eff7 Create annals-of-public-and-cooperative-economics.csl (#5747)
d7477f2 Merge pull request #5368 from POBrien333/patch-862
113e683 Merge pull request #5812 from citation-style-language/apa-no-initials
62dacff Create universitat-oberta-de-catalunya-apa.csl
046482c Fix Organization Studies title
1213b95 Make oranization-studies dependent
c9641f4 Create apa-no-initials.csl
0b4e047 Modify american-journal-of-archaeology.csl (#5719)
ddeda4f Create journal-of-economic-impact.csl (#5707)
40c2696 Update gallia.csl (#5782)
5d5927a Create serbian-archives-of-medicine.csl (#5721)
2777954 Merge pull request #5807 from dhacker29/master
77e3fca Update Society of Biblical Literature Full Note for 6.1.6
4479a5a haaga-helia-university-of-applied-sciences-harvard.csl: no date cites need to be unique (#5726)
d00e046 Create university-of-roehampton-harvard.csl (#5732)
e76da40 Medicinski Razgledi -- fix locale
75b1554 Add original-date extra to proper place as per SBL Handbook 6.2.17-18 (#5725)
d43676e Update harvard-bournemouth-university.csl (#5667)
0312a39 Create ABNT NBR 6023:2018. UNESP – Faculdade de Engenharia de Guarati… (#5705)
6585ff9 Create sinergie-italian-journal-of-management.csl (#5776)
a7dc678 Create journal-of-global-health.csl (#5775)
02080ce Merge pull request #5800 from citation-style-language/validation-fixes
8b51d85 change s. d. to s.d. in french style for INBO reports (issue #2) (#5634)
1b4ec09 Create bloomsbury-academic.csl (#5741)
1f28d87 Create zeithistorische-forschungen.csl (#5766)
bb11942 Remove superfluous 'container' data from wiley-vch-books
06038a7 Remove et-al affixes
be96bd8 Remove et-al affixes from bibliotecae-it.csl
03a94e4 Remove more et-al affixes
07d7423 Revert non-et-al changes to universitat-basel-iberomanistik
f8e5fd8 Create medicinski-razgledi.csl (#5789)
b4df8ee Create dut-harvard.csl (#5762)
40855c4 Fix affixes on et-al
b4fe9b0 Merge pull request #5798 from citation-style-language/uris
3dc4aaf URL-encode documentation URLs
408a3a8 fixes citation-style-language/Sheldon#38
42aca5b Update biophysics-and-physicobiology.csl (#5751)
706bea0 Create universidade-do-porto-faculdade-de-engenharia-chicago-pt.csl (#5742)
269ff91 Update universidade-do-porto-faculdade-de-engenharia-chicago.csl (#5797)
0ba51e7 Update el-profesional-de-la-informacion.csl (#5785)
dac3baf Create arthropod-systematics-and-phylogeny.csl (#5772)
9dff241 Merge pull request #5796 from dhacker29/patch-1
35949f4 Update turabian-fullnote-bibliography-no-ibid.csl
ccfb661 Merge pull request #5793 from benjaminmoon/patch-2
520e127 Update frontiers-medical-journals.csl (#5740)
ab629ab Update natura-croatica.csl (#5795)
60b2b17 Rename turabian-fullnote-bibliography-no-ibid to turabian-fullnote-bibliography-no-ibid.csl
ad4edff Create turabian-fullnote-bibliography-no-ibid
d9b956c Update monographs-of-the-palaeontographical-society.csl
3648ae6 Merge pull request #5792 from StianOby/fix-no-page-number-articles
e15b2f7 Update norsk-henvisningsstandard-for-rettsvitenskapelige-tekster.csl
d8778cf Removed "page" (s. ) term for articles that do not have page numbers.
409017c add medium field for eBooks to MLA 8th

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: f78c707
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