Doctrine\DBAL\Connection::getDatabasePlatform PHP Method

getDatabasePlatform() public method

Gets the DatabasePlatform for the connection.
public getDatabasePlatform ( ) : Doctrine\DBAL\Platforms\AbstractPlatform
return Doctrine\DBAL\Platforms\AbstractPlatform
    public function getDatabasePlatform()
    {
        if (null === $this->platform) {
            $this->detectDatabasePlatform();
        }
        return $this->platform;
    }

Usage Example

示例#1
0
 /**
  * Update status
  *
  * @param string $nonce
  * @param string $apiUrls
  *
  * @return int
  */
 public function updateStatus($nonce, $apiUrls)
 {
     // Truncate table
     $this->con->executeQuery($this->con->getDatabasePlatform()->getTruncateTableSQL($this->tables['status']));
     // Insert new row
     return $this->con->insert($this->tables['status'], array('nonce' => $nonce, 'noncets' => time(), 'apiurls' => $apiUrls, 'modified' => new \DateTime()), array(\PDO::PARAM_STR, \PDO::PARAM_INT, \PDO::PARAM_STR, 'datetime'));
 }
All Usage Examples Of Doctrine\DBAL\Connection::getDatabasePlatform