示例#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!');
     }
 }