indexlake_catalog_postgres/lib.rs
1mod builder;
2mod catalog;
3mod types;
4
5pub use builder::*;
6pub use catalog::*;
7
8pub struct SqlDisplay<'a>(pub &'a str);
9
10impl<'a> std::fmt::Display for SqlDisplay<'a> {
11 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 if self.0.starts_with("INSERT") && self.0.len() > 200 {
13 write!(f, "{}", self.0.chars().take(200).collect::<String>())
14 } else {
15 write!(f, "{}", self.0)
16 }
17 }
18}