public function closeCursor() { if (!$this->ps) { return false; } $success = $this->ps->closeCursor(); $this->ps = null; if (!$success && $this->inner->PDOErrorsToQIErrors) { throw QIError::fromPDO($this->inner->Cn, $this->sql); } return $success; }
/** * @param int $fetchStyle A constant PDO::FETCH_something * @return array The result set */ public function queryFetchAll($fetchStyle = PDO::FETCH_ASSOC) { $sql = $this->toSQL(); $st = $this->inner->Cn->query($sql); if ($st === false) { if ($this->inner->PDOErrorsToQIErrors) { throw QIError::fromPDO($this->inner->Cn, $sql); } return null; } $rs = $st->fetchAll($fetchStyle); if (isset($this->postProcessing)) { $rs = $this->inner->postProcessRS($rs, $this->postProcessing); } return $rs; }
public function exec($sql) { $affected = $this->inner->Cn->exec($sql); if ($affected === false && $this->inner->PDOErrorsToQIErrors) { throw QIError::fromPDO($this->inner->Cn, $sql); } return $affected; }