Author: Mike Naberezny (mike@maintainable.com)
Author: Derek DeVries (derek@maintainable.com)
Author: Chuck Hagenbuch (chuck@horde.org)
Inheritance: extends Horde_Db_Adapter_Base_Column
コード例 #1
0
ファイル: Pgsql.php プロジェクト: lerre/framework
 /**
  * Connect to the db
  */
 public function connect()
 {
     parent::connect();
     // Money type has a fixed precision of 10 in PostgreSQL 8.2 and below, and as of
     // PostgreSQL 8.3 it has a fixed precision of 19. PostgreSQLColumn.extract_precision
     // should know about this but can't detect it there, so deal with it here.
     Horde_Db_Adapter_Postgresql_Column::$moneyPrecision = $this->postgresqlVersion() >= 80300 ? 19 : 10;
     $this->_configureConnection();
 }
コード例 #2
0
ファイル: ColumnTest.php プロジェクト: raz0rsdge/horde
 public function testDefaultString()
 {
     $col = new Horde_Db_Adapter_Postgresql_Column('name', '', 'character varying(255)');
     $this->assertEquals('', $col->getDefault());
 }
コード例 #3
0
ファイル: Pgsql.php プロジェクト: jubinpatel/horde
 /**
  * Connect to the db.
  *
  * @throws Horde_Db_Exception
  */
 public function connect()
 {
     if ($this->_active) {
         return;
     }
     parent::connect();
     $this->_lastQuery = $sql = "SET datestyle TO 'iso'";
     $retval = $this->_connection->exec($sql);
     if ($retval === false) {
         $error = $this->_connection->errorInfo();
         throw new Horde_Db_Exception($error[2]);
     }
     // Money type has a fixed precision of 10 in PostgreSQL 8.2 and below, and as of
     // PostgreSQL 8.3 it has a fixed precision of 19. PostgreSQLColumn.extract_precision
     // should know about this but can't detect it there, so deal with it here.
     Horde_Db_Adapter_Postgresql_Column::$moneyPrecision = $this->postgresqlVersion() >= 80300 ? 19 : 10;
     $this->_configureConnection();
 }