Closes the connection to the database for this connection.

        :return     <bool> closed
515325
def close(self):
        
        for pool in self.__pool.values():
            while not pool.empty():
                conn = pool.get_nowait()
                try:
                    self._close(conn)
                except Exception:
                    pass

        # reset the pool size after closing all connections
        self.__poolSize.clear()
1321350
def close(self, *, commit=True):
    
    self.core.close(self.connection, commit=commit)
    self.connection = None
    return self
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)
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();
    }
684321
def close(self):
        
        if not self.closed:
            self.closed = True
            yield self._framework.yieldable(self._close())
1266551
async def close(self, code: int = 1006, reason: str = "Connection closed"):
        
        if self._closed:
            return

        self._closed = True

        if self._scope is not None:
            await self._scope.cancel()
            # cancel any outstanding listeners

        data = self._connection.send(CloseConnection(code=code, reason=reason))
        await self._sock.send_all(data)

        # No, we don't wait for the correct reply
        await self._sock.close()
658320
def close(self):
        """"""
        if not self.connected: return True

        self._close()
        self.connected = False
        self.log("Closed Connection {}", self.connection_config.interface_name)
        return True
317289
def close(self):
        '''
        
        '''
        if self._wrapped_connection and self._pool:
            logger.debug("Returning connection %s to pool %s" % (self._wrapped_connection, self._pool))
            self._pool.putconn(self._wrapped_connection)
            self._wrapped_connection = None
1170264
def close(self):
        """"""

        if self.closed or self.connection.closed:
            return

        self._cursor.close()
        self.closed = True
1336203
def close(self):
        
        if getattr(self, '_connection', None):
            logger.debug('Closing postgresql connection.')
            self._connection.close()
            self._connection = None
        if getattr(self, '_engine', None):
            self._engine.dispose()
936646
def close(self):
        
        if self._closed:
            return
        if self._autoclose:
            self._transport.close()
            self._transport._closed.wait()
        self._transport = None
        self._closed = True
998814
async def close(self):
        
        push_connection = self.pubsub.push_connection
        self.status = self.statusType.closed
        if push_connection:
            push_connection.event('connection_lost').unbind(
                self._connection_lost
            )
            await self.pubsub.close()
273418
def close(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.close(index=self._name, **kwargs)
1149238
def close(scope):
    
    conn = scope.get('__connection__')
    conn.close(1)
    scope.define(__response__=conn.response)
    return True
157813
@Override
    public void close() {
        if (this.closed.compareAndSet(false, true)) {
            RocksDB db = this.database.get();
            if (db != null) {
                db.close();
                this.database.set(null);
            }

            if (this.writeOptions != null) {
                this.writeOptions.close();
            }

            if (this.databaseOptions != null) {
                this.databaseOptions.close();
            }

            clear(false);
            log.info("{}: Closed.", this.logId);

            Consumer<String> callback = this.closeCallback;
            if (callback != null) {
                Callbacks.invokeSafely(callback, this.id, null);
            }
        }
    }
57424
def close(self):
        
        if not self._closed:
            closed = False
            event = self.event('connection_lost')
            if self.transport:
                if self._loop.get_debug():
                    self.logger.debug('Closing connection %s', self)
                if self.transport.can_write_eof():
                    try:
                        self.transport.write_eof()
                    except Exception:
                        pass
                try:
                    worker = self.close_pipeline()
                    self.transport.close()
                    closed = self._loop.create_task(
                        self._close(event.waiter(), worker)
                    )
                except Exception:
                    pass
            self._closed = closed or True
            if not closed:
                event.fire()
        return self._closed
346056
public boolean close() {
    if (open.compareAndSet(true, false)) {
      futures.forEach(future -> future.completeExceptionally(new IllegalStateException("Closed session")));
      return true;
    }
    return false;
  }