Kdyby\Doctrine\Connection::exec PHP Метод

exec() публичный Метод

public exec ( string $statement ) : integer
$statement string
Результат integer
    public function exec($statement)
    {
        try {
            return parent::exec($statement);
        } catch (\Exception $e) {
            throw $this->resolveException($e, $statement);
        }
    }

Usage Example

 private function createDatabase()
 {
     if ($this->isInitialized) {
         return;
     }
     $databaseName = $this->databaseName = sprintf('%s_%d', $this->namePrefix, $this->processIdProvider->getPid());
     $schemaManager = $this->connection->getSchemaManager();
     $schemaManager->dropAndCreateDatabase($databaseName);
     $this->connection->exec("USE `{$databaseName}`");
     $this->dataLoader->loadFiles($this->connection, $this->schemaFiles);
     $this->isInitialized = TRUE;
 }
All Usage Examples Of Kdyby\Doctrine\Connection::exec