/** * * Extend base adapter function to add stringify to the calls. * * After connection, set various connection attributes. * * @return void * */ protected function _postConnect() { parent::_postConnect(); $alter = "ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD'"; $this->query($alter); $this->_pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); }
/** * * After connection, set various connection attributes. * * @return void * */ protected function _postConnect() { parent::_postConnect(); $this->query("PRAGMA encoding = 'UTF-8';"); // // these don't actually work in 3.x yet :-/ // $this->query("PRAGMA short_column_names = 1;"); // $this->query("PRAGMA full_column_names = 0;"); }