toasty_core/stmt/
insert_table.rs

1use super::InsertTarget;
2use crate::schema::db::{ColumnId, TableId};
3
4#[derive(Debug, Clone, PartialEq)]
5pub struct InsertTable {
6    /// Table identifier to insert into
7    pub table: TableId,
8
9    /// Columns to insert into
10    pub columns: Vec<ColumnId>,
11}
12
13impl From<InsertTable> for InsertTarget {
14    fn from(value: InsertTable) -> Self {
15        Self::Table(value)
16    }
17}
18
19impl From<&InsertTable> for TableId {
20    fn from(value: &InsertTable) -> Self {
21        value.table
22    }
23}