예제 #1
0
 /**
  * Constructor
  *
  * @param \PDO $connection
  * @param string $tableName
  */
 public function __construct(\PDO $connection, $tableName, $schemaName = 'public')
 {
     parent::__construct($connection, $tableName);
     $driver = $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME);
     $this->quote = in_array($driver, array('mysql', 'pgsql')) ? '"' : '`';
     $this->schemaName = $schemaName;
 }
예제 #2
0
파일: SqlOci.php 프로젝트: gazsp/phpmig
 /**
  * Constructor
  *
  * @param \PDO $connection
  * @param string $tableName
  *
  * @throws \Exception
  */
 public function __construct(\PDO $connection, $tableName)
 {
     parent::__construct($connection, $tableName);
     $driver = $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME);
     if (!in_array($driver, array('oci'))) {
         throw new \Exception('Please install OCI drivers for PDO!');
     }
 }