1pub mod catalog;
4pub mod codes;
5pub mod coltypes;
6pub mod config;
7pub mod constraints;
8pub mod dates;
9pub mod diag;
10pub mod dialect;
11pub mod document;
12pub mod engine;
13pub mod error;
14pub mod for_each;
15pub mod fs;
16pub mod lock;
17pub mod lookups;
18pub mod manager;
19pub mod manifest;
20pub mod message;
21mod mutable;
22pub mod no_data;
23pub mod numbers;
24pub mod occurrences;
25pub mod options;
26pub mod packages;
27pub mod parse;
28pub mod plugins;
29pub mod preflight;
30pub mod profiles;
31pub mod project;
32pub mod query;
33pub mod rate;
34pub mod release;
35pub mod render;
36pub mod rows;
37pub mod run;
38pub mod run_results;
39pub mod runs;
40pub mod saved;
41pub mod schedule;
42mod schema;
43pub mod secrets;
44pub mod selector;
45pub mod settings;
46pub mod sqlsplit;
47pub mod target;
48pub mod template_file;
49pub mod values;
50pub mod variables;
51pub mod yaml;
52
53pub use diag::{Diagnostic, Diagnostics, Severity};
54
55pub fn version() -> &'static str {
57 match env!("CARGO_PKG_VERSION") {
58 "0.0.0" => "unreleased",
59 v => v,
60 }
61}
62
63pub fn dre_home() -> std::path::PathBuf {
65 std::env::home_dir().unwrap_or_default().join(".dre")
66}
67
68pub fn slash(p: &std::path::Path) -> std::path::PathBuf {
70 std::path::PathBuf::from(p.to_string_lossy().replace('\\', "/"))
71}