Closing a cursor just exhausts all remaining data.
326496
def close(self):
        
        conn = self.connection
        if conn is None:
            return
        try:
            while self.nextset():
                pass
        finally:
            self.connection = None
1015085
def _Close(self):
    """"""
    self._fsntfs_data_stream = None
    self._fsntfs_file_entry = None

    self._file_system.Close()
    self._file_system = None
1081586
private function closeCursor()
    {
        try {
            if ($this->stmt) {
                $this->stmt->closeCursor();
            }
        } catch (\PDOException $e) {
            die("Error: " . $e->getMessage());
        }
    }
506193
def _Close(self):
    """"""
    self._tar_ext_file.close()
    self._tar_ext_file = None

    self._file_system.Close()
    self._file_system = None
112049
def clear_db():
    """"""
    cursor = '0'
    while cursor != 0:
        cursor, keys = DB.scan(cursor, match='*', count=5000)
        if keys:
            DB.delete(*keys)
417519
def close_cursor(self, cursor):
        
        try:
            cursor.close()
        except Exception as e:
            self.log.warning("Could not close adodbapi cursor\n{}".format(e))
1199413
def close(self, silent=False):
        
        if not silent:
            saveme = get_input("Save database contents to '{}/'? (y, [n]) \n"
                               "To save elsewhere, run db.save() before closing. ".format(self.directory))
            if saveme.lower() == 'y':
                self.save()

            delete = get_input("Do you want to delete {0}? (y,[n]) \n"
                               "Don't worry, a new one will be generated if you run astrodb.Database('{1}') "
                               .format(self.dbpath, self.sqlpath))
            if delete.lower() == 'y':
                print("Deleting {}".format(self.dbpath))
                os.system("rm {}".format(self.dbpath))

        print('Closing connection')
        self.conn.close()
442570
async def close(self) -> None:
        """"""
        await self._execute(self._conn.close)
        self._running = False
        self._connection = None
871936
public void close() {
		stopFetching = true;
		if(rowFetcher != null)
			rowFetcher.interrupt();
		try {
			results.close();
		} catch (OWLException e) {
			// TODO: Handle this in a reasonable manner
			System.out.println(e);
		}
	}
1103679
public void close()
  {
    if (_isFree)
      TempCharBuffer.freeAll(_head);

    _head = null;
    _buffer = null;
    _offset = 0;
    _length = 0;
  }
23994
def Close(self):
    
    if not self._connection:
      raise RuntimeError('Cannot close database not opened.')

    # We need to run commit or not all data is stored in the database.
    self._connection.commit()
    self._connection.close()

    self._connection = None
    self._cursor = None
    self.filename = None
    self.read_only = None
480652
def close(self):
        
        for c in self.cursors:
            c.close()
        self.cursors = []
        self.impl = None
134535
public function close()
    {
        $stmt = null;
        $stmt = $this->getDbStatement(self::cyrus()->getDatabase());

        $stmt->closeCursor();
        $this->pdo = null;
        $this->closed = true;
    }
1323576
def _close(self):
        '''
        
        '''
        if hasattr(self, 'aiohttp'):
            if not self.aiohttp.closed:
                self.aiohttp.close()
        if hasattr(self, 'file_descriptors'):
            for fd in self.file_descriptors.values():
                if not fd.closed:
                    fd.close()
370233
def _close_cursor(self, cursor_id, address):
        
        if self.__cursor_manager is not None:
            self.__cursor_manager.close(cursor_id, address)
        else:
            self.__kill_cursors_queue.append((address, [cursor_id]))
143611
protected void doClose() {
		this.delegate = Collections.<T> emptyList().iterator();
		this.referenceQuery.clear();
		this.position = -1;
		this.cursorMark = null;
	}
536933
public void closeAll(CmsDbContext dbc, Connection con, Statement stmnt, ResultSet res) {

        // NOTE: we have to close Connections/Statements that way, because a dbcp PoolablePreparedStatement
        // is not a DelegatedStatement; for that reason its not removed from the trace of the connection when it is closed.
        // So, the connection tries to close it again when the connection is closed itself;
        // as a result there is an error that forces the connection to be destroyed and not pooled

        if (dbc == null) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_NULL_DB_CONTEXT_0));
        }

        try {
            // first, close the result set
            if (res != null) {
                res.close();
            }
        } catch (SQLException e) {
            LOG.debug(e.getLocalizedMessage(), e);
        } finally {
            res = null;
        }

        try {
            // close the statement
            if (stmnt != null) {
                stmnt.close();
            }
        } catch (SQLException e) {
            LOG.debug(e.getLocalizedMessage(), e);
        } finally {
            stmnt = null;
        }

        try {
            // close the connection
            if ((con != null) && !con.isClosed()) {
                con.close();
            }
        } catch (SQLException e) {
            LOG.debug(e.getLocalizedMessage(), e);
        } finally {
            con = null;
        }

    }