mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-04-29 03:37:39 +02:00
Refactor CveDB
- make class thread-safe and declare so (also DatabaseProperties) - prepared statements represented by enum: performance gain, eases experiments when tuning for performance - minor changes/cleanup/code style
This commit is contained in:
@@ -19,6 +19,7 @@ DELETE_REFERENCE=DELETE FROM reference WHERE cveid = ?
|
||||
DELETE_SOFTWARE=DELETE FROM software WHERE cveid = ?
|
||||
DELETE_VULNERABILITY=DELETE FROM vulnerability WHERE id = ?
|
||||
CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE id not in (SELECT CPEEntryId FROM software);
|
||||
COUNT_CPE=SELECT COUNT(*) records FROM cpeEntry
|
||||
INSERT_REFERENCE=INSERT INTO reference (cveid, name, url, source) VALUES (?, ?, ?, ?)
|
||||
INSERT_SOFTWARE=INSERT INTO software (cveid, cpeEntryId, previousVersion) VALUES (?, ?, ?)
|
||||
INSERT_CPE=INSERT INTO cpeEntry (cpe, vendor, product) VALUES (?, ?, ?)
|
||||
@@ -38,6 +39,6 @@ INSERT_PROPERTY=INSERT INTO properties (id, value) VALUES (?, ?)
|
||||
UPDATE_PROPERTY=UPDATE properties SET value = ? WHERE id = ?
|
||||
DELETE_PROPERTY=DELETE FROM properties WHERE id = ?
|
||||
|
||||
#the following two statements are unused and are only referenecd in dead code
|
||||
#the following two statements are unused and are only referenced in dead code
|
||||
DELETE_UNUSED_DICT_CPE=DELETE FROM cpeEntry WHERE dictionaryEntry=true AND id NOT IN (SELECT cpeEntryId FROM software)
|
||||
ADD_DICT_CPE=MERGE INTO cpeEntry (cpe, vendor, product, dictionaryEntry) KEY(cpe) VALUES(?,?,?,true)
|
||||
|
||||
Reference in New Issue
Block a user