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}
23
24pub type Gap = (usize, &'static str);
25const PARSE_GAP: &str = "SQL could not be parsed completely";
26const ROUTINE_GAP: &str = "stored routine body could not be resolved";
27
28#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
29pub struct Occurrence {
30    pub line: usize,
31    pub column: usize,
32    pub category: String,
33    pub fingerprint: String,
34}