Closes a cursor. For use by recordset only; do not call directly.

@param string $cursorname Name of cursor to close
@return bool True if we actually closed one, false if the transaction was cancelled
353093
public function close_cursor($cursorname) {
        // If the transaction got cancelled, then ignore this request.
        $sql = 'CLOSE ' . $cursorname;
        $this->query_start($sql, [], SQL_QUERY_AUX);
        $result = pg_query($this->pgsql, $sql);
        $this->query_end($result);
        if ($result) {
            pg_free_result($result);
        }
        return true;
    }
1334986
public function close()
    {
        if ( ! $this->link->close()) {
            throw new DbException('can\'t close database connection: ' . $this->link->error, $this->link->errno);
        }

        return true;
    }
1158213
protected function _tag_close_DRAW($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }

        $this->svgDrawer->stopDrawing();


        $this->_maxX = $this->parsingCss->value['old_maxX'];
        $this->_maxY = $this->parsingCss->value['old_maxY'];
        $this->_maxH = $this->parsingCss->value['old_maxH'];

        $marge = array();
        $marge['l'] = $this->parsingCss->value['border']['l']['width'];
        $marge['r'] = $this->parsingCss->value['border']['r']['width'];
        $marge['t'] = $this->parsingCss->value['border']['t']['width'];
        $marge['b'] = $this->parsingCss->value['border']['b']['width'];

        $x = $this->parsingCss->value['x'];
        $y = $this->parsingCss->value['y'];
        $w = $this->parsingCss->value['width']+$marge['l']+$marge['r'];
        $h = $this->parsingCss->value['height']+$marge['t']+$marge['b'];

        if ($this->parsingCss->value['position'] !== 'absolute') {
            $this->pdf->SetXY($x+$w, $y);

            $this->_maxX = max($this->_maxX, $x+$w);
            $this->_maxY = max($this->_maxY, $y+$h);
            $this->_maxH = max($this->_maxH, $h);
            $this->_maxE++;
        } else {
            // position
            $this->pdf->SetXY($this->parsingCss->value['xc'], $this->parsingCss->value['yc']);

            $this->_loadMax();
        }

        $block = ($this->parsingCss->value['display'] !== 'inline' && $this->parsingCss->value['position'] !== 'absolute');

        $this->parsingCss->load();
        $this->parsingCss->fontSet();
        $this->_loadMargin();

        if ($block) {
            $this->_tag_open_BR(array());
        }
        if (!is_null($this->debug)) {
            $this->debug->addStep('DRAW', false);
        }

        return true;
    }
474898
protected function _tag_close_TH($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }

        $this->_tag_close_TD($param);

        $this->parsingCss->load();

        return true;
    }
802431
protected function _tag_close_LI($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }

        $this->_tag_close_TD($param);

        $this->_tag_close_TR($param);

        return true;
    }
417030
public function recordset_closed(sqlsrv_native_moodle_recordset $rs) {
        if ($key = array_search($rs, $this->recordsets, true)) {
            unset($this->recordsets[$key]);
        }
    }
1277715
public function close()
    {
        if (is_array($this->hander)) {
            $this->gc($this->lifeTime);
            return (mysqli_close($this->hander[0]) && mysqli_close($this->hander[1]));
        }
        $this->gc($this->lifeTime);
        return mysqli_close($this->hander);
    }
362201
def close(self):
        
        self._cursor.close()
        self._db.close()
        self._cursor = self._db = self._cache = None
935720
protected function freeResult($cursor = null)
	{
		$useCursor = $cursor ?: $this->cursor;

		if (\is_resource($useCursor))
		{
			sqlsrv_free_stmt($useCursor);
		}
	}
214627
public static function reset($strName = 'default')
    {
        $objTimer = static::getTimerInstance($strName, false);
        if ($objTimer) {
            return $objTimer->resetTimer();
        }
        return null;
    }
334335
function _close()
	{
		if(is_object($this->_queryID)) {
			$rez = sqlsrv_free_stmt($this->_queryID);
			$this->_queryID = false;
			return $rez;
		}
		return true;
	}
161888
public function cursor()
    {
        if (is_null($this->columns)) {
            $this->columns = ['*'];
        }

        return $this->connection->cursor(
            $this->toSql(), $this->getBindings(), ! $this->useWritePdo
        );
    }
1016610
public function onClose(ConnectionInterface $conn) {
    $this->logger->notice("Client skedaddled. ({$conn->resourceId})");

    $mess = 0;
    foreach ($this->querySubs as $curEtype => &$curSubscriptions) {
      foreach ($curSubscriptions as $curQuery => &$curClients) {
        if ($curClients->contains($conn)) {
          unset($curClients[$conn]);

          $count = count($curClients);

          if ($count === 0) {
            unset($curSubscriptions[$curQuery]);
            if (count($this->querySubs[$curEtype]) === 0) {
              unset($this->querySubs[$curEtype]);
            }
          } else {
            if (Server::$config['broadcast_counts']) {
              // Notify clients of the subscription count.
              foreach ($curClients as $key) {
                $curData = $curClients[$key];
                if ($curData['count']) {
                  $key->send(json_encode([
                    'query' => $curData['query'],
                    'count' => $count
                  ]));
                }
              }
            }
          }
          $mess++;
        }
      }
      unset($curClients);
    }
    unset($curSubscriptions);

    foreach ($this->uidSubs as $curUID => $curClients) {
      if ($curClients->contains($conn)) {
        unset($curClients[$conn]);

        $count = count($curClients);

        if ($count === 0) {
          unset($this->uidSubs[$curUID]);
        } else {
          if (Server::$config['broadcast_counts']) {
            // Notify clients of the subscription count.
            foreach ($curClients as $key) {
              $curData = $curClients[$key];
              if ($curData['count']) {
                $key->send(json_encode([
                  'uid' => $curUID,
                  'count' => $count
                ]));
              }
            }
          }
        }
        $mess++;
      }
    }

    if ($this->sessions->contains($conn)) {
      unset($this->sessions[$conn]);
      $mess++;
    }

    if ($mess) {
      $this->logger->notice(
          "Cleaned up client's mess. ".
            "($mess, {$conn->resourceId})"
      );
    }
  }
612104
protected function _tag_close_TR($param)
    {
        if ($this->_isForOneLine) {
            return false;
        }

        $this->_maxH = 0;

        $this->parsingCss->load();
        $this->parsingCss->fontSet();

        // if we are not in a sub HTML
        if (!$this->_subPart) {

            // Y of the current line
            $ty=null;
            $nbTrCurrs = count(self::$_tables[$param['num']]['cases'][self::$_tables[$param['num']]['tr_curr']-1]);
            for ($ii=0; $ii<$nbTrCurrs; $ii++) {
                if (self::$_tables[$param['num']]['cases'][self::$_tables[$param['num']]['tr_curr']-1][$ii]['rowspan'] == 1) {
                    $ty = self::$_tables[$param['num']]['cases'][self::$_tables[$param['num']]['tr_curr']-1][$ii]['h'];
                }
            }

            // new position
            self::$_tables[$param['num']]['td_x'] = self::$_tables[$param['num']]['curr_x']+self::$_tables[$param['num']]['marge']['l'];
            self::$_tables[$param['num']]['td_y']+= $ty;
            self::$_tables[$param['num']]['new_page'] = false;
        } else {
            self::$_tables[$param['num']]['corr_y']++;
        }

        return true;
    }
91262
public function freeResult($cursor = null)
    {
        $cursor = $cursor ?: $this->cursor;

        if ($cursor instanceof \PDOStatement) {
            $cursor->closeCursor();

            $cursor = null;
        }

        return $this;
    }
18572
public function close($data = null, $raw = false)
    {
        if ($data !== null) {
            $this->send($data, $raw);
        }
        return true;
    }
645166
public function closeCursor()
    {
        set_error_handler(array($this->_pdooci,"errorHandler"));
        try {
            \oci_free_statement($this->_stmt);
        } catch (\Exception $e) {
            throw new \PDOException($e->getMessage());
        }
        restore_error_handler();
        $this->_stmt = null;
    }