mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(ldb) Better handling of null pubYear
This commit is contained in:
parent
764e7d1315
commit
763ed260c3
@ -57,12 +57,11 @@ public class LinkdbWriter {
|
||||
stmt.setLong(8, document.dataHash());
|
||||
stmt.setDouble(9, document.urlQuality());
|
||||
if (document.pubYear() == null) {
|
||||
stmt.setNull(10, Types.INTEGER);
|
||||
stmt.setInt(10, 0);
|
||||
} else {
|
||||
stmt.setInt(10, document.pubYear());
|
||||
}
|
||||
|
||||
stmt.addBatch();
|
||||
|
||||
if (++i > 1000) {
|
||||
stmt.executeBatch();
|
||||
|
Loading…
Reference in New Issue
Block a user