SQLServer2005Platform.php 1.18 KB
Newer Older
1 2 3 4 5
<?php

namespace Doctrine\DBAL\Platforms;

/**
6
 * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2005 version and
7
 * higher.
8 9 10 11 12 13
 *
 * Differences to SQL Server 2008 are:
 *
 * - DATETIME2 datatype does not exist, only DATETIME which has a precision of
 *   3. This is not supported by PHP DateTime, so we are emulating it by
 *   setting .000 manually.
14 15 16 17
 * - Starting with SQLServer2005 VARCHAR(MAX), VARBINARY(MAX) and
 *   NVARCHAR(max) replace the old TEXT, NTEXT and IMAGE types. See
 *   {@link http://www.sql-server-helper.com/faq/sql-server-2005-varchar-max-p01.aspx}
 *   for more information.
18 19
 *
 * @deprecated Use SQL Server 2012 or newer
20
 */
21
class SQLServer2005Platform extends SQLServerPlatform
22
{
23
    /**
24
     * {@inheritDoc}
25 26 27 28 29
     */
    public function supportsLimitOffset()
    {
        return true;
    }
30 31 32 33

    /**
     * {@inheritDoc}
     */
34
    public function getClobTypeDeclarationSQL(array $column)
35 36 37
    {
        return 'VARCHAR(MAX)';
    }
38 39 40 41 42 43 44 45

    /**
     * {@inheritdoc}
     *
     * Returns Microsoft SQL Server 2005 specific keywords class
     */
    protected function getReservedKeywordsClass()
    {
46
        return Keywords\SQLServer2005Keywords::class;
47
    }
48
}