(client: &mut SessionClient)
| 1655 | } |
| 1656 | |
| 1657 | fn make_notices(client: &mut SessionClient) -> Vec<Notice> { |
| 1658 | client |
| 1659 | .session() |
| 1660 | .drain_notices() |
| 1661 | .into_iter() |
| 1662 | .map(|notice| Notice { |
| 1663 | message: notice.to_string(), |
| 1664 | code: notice.code().code().to_string(), |
| 1665 | severity: notice.severity().as_str().to_lowercase(), |
| 1666 | detail: notice.detail(), |
| 1667 | hint: notice.hint(), |
| 1668 | }) |
| 1669 | .collect() |
| 1670 | } |
| 1671 | |
| 1672 | // Duplicated from protocol.rs. |
| 1673 | // See postgres' backend/tcop/postgres.c IsTransactionExitStmt. |