Skip to main content

no_mistakes_postgres_engine/
lock_inventory.rs

1mod compare;
2mod embedded;
3mod helpers;
4mod report;
5mod sql;
6#[cfg(test)]
7mod tests;
8mod types;
9
10pub use compare::{baseline_site_identity, compare_baseline};
11pub use embedded::{record_embedded_calls, Positions};
12pub use helpers::LockHelperNames;
13pub use report::build_report;
14pub use sql::record_sql_statement;
15use sql::sql_helper;
16pub use types::*;
17
18#[derive(Default)]
19pub struct FileInventory {
20    pub sites: Vec<Occurrence>,
21    pub gaps: Vec<Gap>,
22    pub(crate) parse_failure_lines: std::collections::BTreeSet<usize>,
23    pub scan_failure: Option<&'static str>,
24    pub native_scan_failed: bool,
25}
26
27pub type Gap = (usize, &'static str);
28const PARSE_GAP: &str = "SQL could not be parsed completely";
29const ROUTINE_GAP: &str = "stored routine body could not be resolved";
30
31#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
32pub struct Occurrence {
33    pub line: usize,
34    pub column: usize,
35    pub category: String,
36    pub fingerprint: String,
37}