Skip to main content

no_mistakes_postgres_sql/statement_facts/
insert.rs

1use super::{SqlAssignmentFact, SqlOnConflictFact};
2
3/// One executed `INSERT` recovered from PostgreSQL SQL.
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub struct SqlInsertFact {
6    pub table: String,
7    /// Qualified identifier with PostgreSQL case and quoting preserved.
8    pub catalog_table: String,
9    pub line: usize,
10    pub column: usize,
11    pub executed: bool,
12    pub on_conflict: Option<SqlOnConflictFact>,
13    pub guarded_select: bool,
14    pub target_columns: Vec<String>,
15    /// Whole columns assigned from their same-named EXCLUDED values.
16    pub overwritten_columns: Vec<String>,
17    /// INSERT `SET` assignments, or column/value forms from `VALUES` / `SELECT`.
18    pub assignments: Vec<SqlAssignmentFact>,
19}