SQLServer2005Platform.php 1.14 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
class SQLServer2005Platform extends SQLServerPlatform
20
{
21
    /**
22
     * {@inheritDoc}
23 24 25 26 27
     */
    public function supportsLimitOffset()
    {
        return true;
    }
28 29 30 31

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

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