aboutsummaryrefslogtreecommitdiff
path: root/dbstore/sql
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-17 23:42:11 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-17 23:42:11 -0500
commitd3ae0601b33a6cb73301e664dd1cceb2faf96df3 (patch)
treef7bb2d9df91b8b412dd14c087be77aab3f027404 /dbstore/sql
parent4188056a716add27a5d44b045e28c14ffa933eb0 (diff)
downloadcvez-d3ae0601b33a6cb73301e664dd1cceb2faf96df3.tar.bz2
cvez-d3ae0601b33a6cb73301e664dd1cceb2faf96df3.zip
dbstore: add DbStore#CpeMatchSearch() and backing query
Diffstat (limited to 'dbstore/sql')
-rw-r--r--dbstore/sql/cpe-match/search.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/dbstore/sql/cpe-match/search.sql b/dbstore/sql/cpe-match/search.sql
new file mode 100644
index 0000000..45dd1f6
--- /dev/null
+++ b/dbstore/sql/cpe-match/search.sql
@@ -0,0 +1,11 @@
+SELECT c.cpe23
+
+ FROM cpe_matches a
+ JOIN cpe_match_cpes b
+ ON (b.cpe_match_id = a.cpe_match_id)
+ JOIN cpes c
+ ON (c.cpe_id = b.cpe_id)
+
+ WHERE a.cpe23 = ?
+
+ ORDER BY c.cpe23