diff --git a/notes/derived-tables.svg b/notes/derived-tables.svg new file mode 100644 index 0000000..76afc34 --- /dev/null +++ b/notes/derived-tables.svg @@ -0,0 +1,4 @@ + + + +create table project ( id INT, -- primary key, fixed, maybe hash of repo name (metainfo) project_name STRING, -- repo name-short name (treeio-treeio) (sarif) creation_date DATE, -- fixed, repository creation date (metainfo) repo_url STRING, -- fixed, https://... (sarif) primary_language STRING, -- by lines of code (metainfo) languages_analyzed STRING, -- simple json array ['cpp', 'python'] or -- 'cpp,python' (sarif, semmle.sourceLanguage) );create table results ( id INT, -- primary key scan_id INT, -- scans.id query_id STRING, -- git commit id of the ql query set location STRING, message STRING, message_object OBJ, -- -- -- kind_path_problem have distinct source / sink, kind_problem uses the same for both result_type STRING, -- kind_problem | kind_path_problem -- codeFlow_id INT, -- link to codeflows (kind_path_problem only, NULL otherwise) -- source_startLine int, source_startCol int, source_endLine int, source_endCol int, -- sink_startLine int, sink_startCol int, sink_endLine int, sink_endCol int, -- source_object STRING, -- higher-level info: 'args', 'request', etc. sink_object, -- higher level: 'execute', 'sql statement', etc.); artifacts.csv artifacts_idindexuriuriBaseId codeflows.csv codeflow_idcodeflow_indexthreadflow_indexlocation_indexendColumnendLinestartColumnstartLineartifact_indexuriuriBaseIdmessage kind_pathproblem.csv results_array_idresults_array_indexcodeFlows_idruleIdruleIndexlocation_array_indexlocation_idlocation_endColumnlocation_endLinelocation_startColumnlocation_startLinelocation_indexlocation_urilocation_uriBaseIdlocation_messagerelatedLocation_array_indexrelatedLocation_idrelatedLocation_endColumnrelatedLocation_endLinerelatedLocation_startColumnrelatedLocation_startLinerelatedLocation_indexrelatedLocation_urirelatedLocation_uriBaseIdrelatedLocation_messagemessage_textprimaryLocationLineHashprimaryLocationStartColumnFingerprintrule_idrule_index kind_problem.csv results_array_idresults_array_indexruleIdruleIndexlocation_array_indexlocation_idlocation_endColumnlocation_endLinelocation_startColumnlocation_startLinelocation_indexlocation_urilocation_uriBaseIdlocation_messagerelatedLocation_array_indexrelatedLocation_idrelatedLocation_endColumnrelatedLocation_endLinerelatedLocation_startColumnrelatedLocation_startLinerelatedLocation_indexrelatedLocation_urirelatedLocation_uriBaseIdrelatedLocation_messagemessage_textprimaryLocationLineHashprimaryLocationStartColumnFingerprintrule_idrule_index relatedLocations.csv struct_iduristartLinestartColumnendLineendColumnmessage rules.csv rules_array_idrules_array_indexidnameenabledlevelfullDescriptionshortDescriptionkindprecisionsecurity-severityseveritysub-severitytag_indextag_text create table node_results ( -- This is just a renaming of the codeflows table, -- all nodes on a path id INT, result_id INT, path_index INT, -- t9799_index node_index INT, -- t1075_locations_index rest, -- from codeFlows message, -- from message_text_2 );==> project.csv <==to be replacedcreation_dateprimary_languageproject_namequery_commit_idsarif_file_namescan_idscan_start_datescan_stop_datetool_nametool_version$schemasarif_versionrun_indexartifactscolumnKindresultssemmle.formatSpecifiersemmle.sourceLanguagedriver_nameorganizationrulesdriver_versionrepositoryUrirevisionId==> project-meta.csv <==creation_dateprimary_languageproject_namequery_commit_idsarif_file_namescan_idscan_start_datescan_stop_datetool_nametool_version==> project-sarif-result.csv <==$schemasarif_versionrun_indexartifactscolumnKindresultssemmle.formatSpecifiersemmle.sourceLanguagedriver_nameorganizationrulesdriver_versionrepositoryUrirevisionIdcreate table scans ( id INT, -- primary key, unique for analysis (not sarif) (scan_id) commit_id STRING, -- git commit id of the project (sarif revisionId) project_id INT, -- project.id -- db_create_start DATE, -- datetime db_create_stop DATE, -- datetime -- scan_start_date DATE, -- beginning date/time of scan (queries, not db) (metainfo) scan_stop_date DATE, -- beginning date/time of scan (queries, not db) (metainfo) -- tool_name STRING, -- codeql / lgtm tool_version STRING, -- 2.83 / 1.27 query_commit_id, -- git commit of custom queries -- sarif_file_name STRING, -- The sarif result file for this scan);to be: table scans ( id INT, -- primary key, unique for analysis (not sarif) (scan_id) commit_id STRING, -- git commit id of the project (sarif revisionId) project_id INT, -- project.id -- db_create_start DATE, -- datetime db_create_stop DATE, -- datetime -- scan_start_date DATE, -- beginning date/time of scan (queries, not db) (metainfo) scan_stop_date DATE, -- beginning date/time of scan (queries, not db) (metainfo) -- tool_name STRING, -- codeql / lgtm tool_version STRING, -- 2.83 / 1.27 query_commit_id, -- git commit of custom queries -- sarif_file_name STRING, -- The sarif result file for this scan);
base tables from sarif
base tables from sarif
Goal tables
Goal tables
sarif driver tables
sarif driver tables
test driver, to be removed
test driver, to be removed
Text is not SVG - cannot display
\ No newline at end of file