Closes the database connection. Close should be called on this object
when it is done being used.
8969
@Override
    public synchronized void close() {
        if (isOpen()) {
            clearCache();
            closeStatements();
            try {
                connection.close();
            } catch (SQLException ex) {
                LOGGER.error("There was an error attempting to close the CveDB, see the log for more details.");
                LOGGER.debug("", ex);
            } catch (Throwable ex) {
                LOGGER.error("There was an exception attempting to close the CveDB, see the log for more details.");
                LOGGER.debug("", ex);
            }
            releaseResources();
            connectionFactory.cleanup();
        }
    }
1040066
def _Close(self):
    """"""
    if self._database_object:
      self._database_object.Close()

    self._blob = None
    self._current_offset = 0
    self._size = 0
    self._table_name = None
445225
public void close(boolean closeConnection) throws SQLException {
        if (closeConnection) {
            resultSet.getStatement().getConnection().close();
        } else {
            resultSet.close();
        }

        finished = true;
    }
265332
def close(self):
        """"""
        if self.connection:
            self.connection.close()
            self.connection = None
            logging.debug("Connection closed.")
1006750
private void closeConnection()
  {
    disconnect();


    if (log.isLoggable(Level.FINE)) {
      _dbgId = (port().address() + ":" + port().port() + "-" + _connectionId);
      Thread.currentThread().setName(_dbgId);
    }
  }
1357279
def close(self):
        
        LOGGER.debug('Connection Closing')
        if not self.is_closed:
            self.set_state(self.CLOSING)
        self.heartbeat.stop()
        try:
            if not self.is_closed and self.socket:
                self._channel0.send_close_connection()
                self._wait_for_connection_state(state=Stateful.CLOSED)
        except AMQPConnectionError:
            pass
        finally:
            self._close_remaining_channels()
            self._io.close()
            self.set_state(self.CLOSED)
        LOGGER.debug('Connection Closed')
1371303
public static void close(Connection conn) {
        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException ex) {
                logger.error("", ex);
            }
        }
    }
718593
@Override
  public void close() throws SQLException {
    super.close();
    if (connection == null || connection.pooledConnection == null
        || connection.pooledConnection.noStmtEventListeners()) {
      return;
    }
    connection.pooledConnection.fireStatementClosed(this);
    connection = null;
  }
99742
@Override
	public void close() {
		lockDb.lock();
		try {
			if (openCounter.decrementAndGet() <= 0) {

				if (!this.options.inMemory) {
					// Closing database
					if (database != null) {
						clearCompiledStatements();
						database.close();
					}
					database = null;
				}
				if (logEnabled)
					Logger.info("database CLOSED (%s) (connections: %s)", status.get(), openCounter.intValue());
			} else {
				if (logEnabled)
					Logger.info("database RELEASED (%s) (connections: %s)", status.get(), openCounter.intValue());
			}
		} finally {
			switch (status.get()) {
			case READ_AND_WRITE_OPENED:
				if (database == null)
					status.set(TypeStatus.CLOSED);
				lockReadWriteAccess.unlock();
				lockDb.unlock();
				break;
			case READ_ONLY_OPENED:
				if (database == null)
					status.set(TypeStatus.CLOSED);
				lockReadAccess.unlock();
				lockDb.unlock();
				break;
			case CLOSED:
				// do nothing
				lockDb.unlock();
				break;
			default:
				lockDb.unlock();
				throw (new KriptonRuntimeException("Inconsistent status"));
			}

		}

	}
125082
def close(self):
        
        # Without this thread lock, there is a window during which
        # select() can find a closed socket, leading to an EBADF error.
        with self.reactor.mutex:
            self.disconnect("Closing object")
            self.reactor._remove_connection(self)
486601
final void closeAndRemoveAllDatabaseHandles() {
        for (Database databaseHandle : this.databaseHandles) {
            try {
                databaseHandle.close();
            } catch (EnvironmentFailureException | IllegalStateException ex) {
                LOGGER.log(Level.SEVERE,
                        "Error closing databases", ex);
            }
        }
        this.databaseHandles.clear();
    }
834357
public void close() throws SQLException {

        validate();

        try {
            this.connection.rollback();
            this.connection.clearWarnings();
            this.connectionDefaults.setDefaults(this.connection);
            this.connection.reset();
            fireCloseEvent();
        } catch (SQLException e) {
            fireSqlExceptionEvent(e);

            throw e;
        }
    }
565600
def close_connection(self, connection: str) -> None:
        
        if connection not in self.connections:
            raise ConnectionNotOpen(connection)

        self.connections.pop(connection).close()
1108245
public function closeConnection()
    {
        $this->db_connected = false;
        $this->db_index     = 0;

        // release statement and connection resources
        $this->last_result  = null;
        $this->dbh          = null;
        $this->dbhs         = array();
    }
847233
public void close() {
		try {
			Statement statement = set.getStatement();
			if (statement!=null && !statement.isClosed())
				statement.close();
			// Normally not necessary (according to the JDBC standard)
			if (set!=null && !set.isClosed())
				set.close();
		} catch (SQLException e) {
			// NO-OP
		}
	}
470183
@Override
    public void closeConnection() throws JdbcServerException {
        if (!endpointConfiguration.isAutoConnect()) {
            handleMessageAndCheckResponse(JdbcMessage.closeConnection());
        }

        if (connections.decrementAndGet() < 0) {
            connections.set(0);
        }
    }
202109
@Override
	public void close() {
		if (this.closed) {
			return;
		}
		this.closed = true;
		if (this.raf != null) {
			/*
			 * everything is written already. just update the header for
			 * record count and the END_OF_DATA mark
			 */
			try {
				this.header.numberOfRecords = this.recordCount;
				this.raf.seek(0);
				this.header.write(this.raf);
				this.raf.seek(this.raf.length());
				this.raf.writeByte(END_OF_DATA);
			}
			catch (IOException e) {
				throw new DBFException(e.getMessage(), e);
			}
			finally {
				DBFUtils.close(this.raf);
			}
		}
		else if (this.outputStream != null) {
			try {
				writeToStream(this.outputStream);
			}
			finally {
				DBFUtils.close(this.outputStream);
			}
		}

	}