public function setAttribute($attribute, $value) { if ($this->_statement instanceof \PDOStatement) { return $this->_statement->setAttribute($attribute, $value); } return false; }
/** * Set a statement attribute. * * @param string $key Attribute name. * @param mixed $val Attribute value. * @return bool * @throws Zend_Db_Statement_Exception */ public function setAttribute($key, $val) { try { return $this->_stmt->setAttribute($key, $val); } catch (PDOException $e) { require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage()); } }
/** * @param int $attribute * @param mixed $value * @return bool * @throws \Compeek\PDOWrapper\NotConnectedException */ public function setAttribute($attribute, $value) { $this->requireConnection(); $result = $this->pdoStatement->setAttribute($attribute, $value); if ($result) { $this->pdoStatementAttributes[$attribute] = $value; } return $result; }
/** * Moves internal resulset cursor to another position letting us to fetch a certain row * *<code> * $result = $connection->query("SELECT * FROM robots ORDER BY name"); * $result->dataSeek(2); // Move to third row on result * $row = $result->fetch(); // Fetch third row *</code> * * @param int $number * @return null|false */ public function dataSeek($number) { /* Validation */ if (is_int($number) === false) { return; } $this->_rowOffset = $number; if ($this->_pdoStatement->setAttribute(\PDO::ATTR_CURSOR, \PDO::CURSOR_SCROLL) === false) { return false; } }
public function setFetchSize($fetchSize) { $this->checkClosed(); $this->stmt->setAttribute(\PDO::ATTR_PREFETCH, \blaze\lang\Integer::asNative($fetchSize)); }
/** * csvImporter constructor. * @param PDOStatement $dbh */ public function __construct($dbh, $csvPath) { $dbh->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true); $this->dbh = $dbh; $this->csvPath = $csvPath; }
/** * @param int $attribute * @param mixed $value * @return bool */ public function setAttribute($attribute, $value) { $archLog = array('method' => 'PDOStatement::setAttribute', 'input' => array('attribute' => $attribute, 'value' => $value), 'output' => $this->PDOStatement->setAttribute($attribute, $value), 'pointer' => $this->assignPointerString()); return self::setLogReturnOutput($archLog); }