| 629 | } |
| 630 | |
| 631 | void ODBCConnection::Disconnect() { |
| 632 | if (is_connected_) { |
| 633 | // Ensure that all statements (and corresponding SPI statements) get cleaned |
| 634 | // up before terminating the SPI connection in case they need to be de-allocated in |
| 635 | // the reverse of the allocation order. |
| 636 | statements_.clear(); |
| 637 | spi_connection_->Close(); |
| 638 | is_connected_ = false; |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | void ODBCConnection::ReleaseConnection() { |
| 643 | Disconnect(); |