DatabasePlatformMock.php 1.82 KB
Newer Older
1 2
<?php

3
namespace Doctrine\Tests\Mocks;
romanb's avatar
romanb committed
4

5
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
6
{
7
    private $_sequenceNextValSql = "";
8 9
    private $_prefersIdentityColumns = true;
    private $_prefersSequences = false;
10

romanb's avatar
romanb committed
11 12 13
    /**
     * @override
     */
14
    public function getNativeDeclaration(array $field) {}
15

romanb's avatar
romanb committed
16 17 18
    /**
     * @override
     */
19
    public function getPortableDeclaration(array $field) {}
20

romanb's avatar
romanb committed
21 22 23
    /**
     * @override
     */
24 25
    public function prefersIdentityColumns()
    {
romanb's avatar
romanb committed
26 27
        return $this->_prefersIdentityColumns;
    }
28

29 30 31 32 33 34 35 36
    /**
     * @override
     */
    public function prefersSequences()
    {
        return $this->_prefersSequences;
    }

37 38 39 40 41 42
    /** @override */
    public function getSequenceNextValSql($sequenceName)
    {
        return $this->_sequenceNextValSql;
    }

43 44 45
    /** @override */
    public function getBooleanTypeDeclarationSql(array $field) {}

46 47 48 49 50 51 52 53 54 55 56 57 58
    /** @override */
    public function getIntegerTypeDeclarationSql(array $field) {}

    /** @override */
    public function getBigIntTypeDeclarationSql(array $field) {}

    /** @override */
    public function getSmallIntTypeDeclarationSql(array $field) {}

    /** @override */
    protected function _getCommonIntegerTypeDeclarationSql(array $columnDef) {}

    /** @override */
59
    public function getVarcharTypeDeclarationSql(array $field) {}
60 61 62
    
    /** @override */
    public function getClobTypeDeclarationSql(array $field) {}
63

romanb's avatar
romanb committed
64
    /* MOCK API */
65

romanb's avatar
romanb committed
66 67
    public function setPrefersIdentityColumns($bool)
    {
68 69 70 71 72 73
        $this->_prefersIdentityColumns = $bool;
    }

    public function setPrefersSequences($bool)
    {
        $this->_prefersSequences = $bool;
romanb's avatar
romanb committed
74
    }
75 76 77 78 79

    public function setSequenceNextValSql($sql)
    {
        $this->_sequenceNextValSql = $sql;
    }
80 81 82 83 84

    public function getName()
    {
        return 'mock';
    }
85
}