Esempio n. 1
0
 /**
  * Constructor
  *
  * @param   rdbms.DSN dsn
  */
 public function __construct($dsn)
 {
     parent::__construct($dsn);
     $this->formatter = new StatementFormatter($this, $this->getDialect());
     $sock = new Socket($this->dsn->getHost(), $this->dsn->getPort(1433));
     $sock->setTimeout(-1);
     $this->handle = $this->getProtocol($sock);
 }
 /**
  * Constructor
  *
  * @param   rdbms.DSN dsn
  */
 public function __construct($dsn)
 {
     parent::__construct($dsn);
     $this->formatter = new StatementFormatter($this, new MysqlDialect());
     // Use local socket (unix socket on Un*x systems, named pipe on Windows)
     // if "." is supplied as hostname
     $host = $this->dsn->getHost();
     if ('.' === $host) {
         $sock = LocalSocket::forName(PHP_OS)->newInstance($this->dsn->getProperty('socket', null));
     } else {
         $sock = new Socket($host, $this->dsn->getPort(3306));
         $sock->setTimeout(-1);
     }
     $this->handle = new MySqlxProtocol($sock);
 }
 /**
  * Constructor
  *
  * @param   rdbms.DSN dsn
  */
 public function __construct($dsn)
 {
     parent::__construct($dsn);
     $this->formatter = new StatementFormatter($this, new InterBaseDialect());
 }
 /**
  * Constructor
  *
  * @param   rdbms.DSN dsn
  */
 public function __construct($dsn)
 {
     parent::__construct($dsn);
     $this->formatter = new StatementFormatter($this, new MockDialect());
     $this->clearResultSets();
 }
 /**
  * Constructor
  *
  * @param   rdbms.DSN dsn
  */
 public function __construct($dsn)
 {
     parent::__construct($dsn);
     $this->formatter = new StatementFormatter($this, new PostgreSQLDialect());
 }