(
scx: &StatementContext,
InsertStatement {
table_name,
columns,
source,
returning,
}: InsertStatement<Aug>,
)
| 75 | // executed. |
| 76 | |
| 77 | pub fn describe_insert( |
| 78 | scx: &StatementContext, |
| 79 | InsertStatement { |
| 80 | table_name, |
| 81 | columns, |
| 82 | source, |
| 83 | returning, |
| 84 | }: InsertStatement<Aug>, |
| 85 | ) -> Result<StatementDesc, PlanError> { |
| 86 | let (_, _, returning) = query::plan_insert_query(scx, table_name, columns, source, returning)?; |
| 87 | let desc = if returning.expr.is_empty() { |
| 88 | None |
| 89 | } else { |
| 90 | Some(returning.desc) |
| 91 | }; |
| 92 | Ok(StatementDesc::new(desc)) |
| 93 | } |
| 94 | |
| 95 | pub fn plan_insert( |
| 96 | scx: &StatementContext, |
no test coverage detected