AbstractSQLServerDriver.php 1016 Bytes
Newer Older
1 2 3 4
<?php

namespace Doctrine\DBAL\Driver;

5
use Doctrine\DBAL\Connection;
6
use Doctrine\DBAL\Driver;
7 8
use Doctrine\DBAL\Driver\DriverException as TheDriverException;
use Doctrine\DBAL\Exception\DriverException;
9
use Doctrine\DBAL\Platforms\SQLServer2012Platform;
10 11 12 13 14
use Doctrine\DBAL\Schema\SQLServerSchemaManager;

/**
 * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers.
 */
15
abstract class AbstractSQLServerDriver implements Driver
16 17 18 19 20 21
{
    /**
     * {@inheritdoc}
     */
    public function getDatabasePlatform()
    {
22
        return new SQLServer2012Platform();
23 24 25 26 27
    }

    /**
     * {@inheritdoc}
     */
28
    public function getSchemaManager(Connection $conn)
29 30 31
    {
        return new SQLServerSchemaManager($conn);
    }
32 33 34 35 36 37 38 39 40 41

    /**
     * @param string $message
     *
     * @return DriverException
     */
    public function convertException($message, TheDriverException $exception)
    {
        return new DriverException($message, $exception);
    }
42
}