2008-08-01 22:46:14 +04:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\Tests\Mocks;
|
2009-01-04 19:15:32 +03:00
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
|
2008-08-01 22:46:14 +04:00
|
|
|
{
|
2009-03-14 12:05:52 +03:00
|
|
|
private $_sequenceNextValSql = "";
|
2009-03-30 23:43:05 +04:00
|
|
|
private $_prefersIdentityColumns = true;
|
|
|
|
private $_prefersSequences = false;
|
2009-05-27 22:54:40 +04:00
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2008-08-31 22:27:16 +04:00
|
|
|
public function getNativeDeclaration(array $field) {}
|
2009-05-27 22:54:40 +04:00
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2008-08-01 22:46:14 +04:00
|
|
|
public function getPortableDeclaration(array $field) {}
|
2009-05-27 22:54:40 +04:00
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2009-02-18 10:59:11 +03:00
|
|
|
public function prefersIdentityColumns()
|
|
|
|
{
|
2008-09-07 17:48:40 +04:00
|
|
|
return $this->_prefersIdentityColumns;
|
|
|
|
}
|
2009-01-07 20:46:02 +03:00
|
|
|
|
2009-03-30 23:43:05 +04:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function prefersSequences()
|
|
|
|
{
|
|
|
|
return $this->_prefersSequences;
|
|
|
|
}
|
|
|
|
|
2009-03-14 12:05:52 +03:00
|
|
|
/** @override */
|
|
|
|
public function getSequenceNextValSql($sequenceName)
|
|
|
|
{
|
|
|
|
return $this->_sequenceNextValSql;
|
|
|
|
}
|
|
|
|
|
2009-09-05 06:44:45 +04:00
|
|
|
/** @override */
|
|
|
|
public function getBooleanTypeDeclarationSql(array $field) {}
|
|
|
|
|
2009-01-07 20:46:02 +03:00
|
|
|
/** @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 */
|
2009-05-03 22:07:57 +04:00
|
|
|
public function getVarcharTypeDeclarationSql(array $field) {}
|
2009-10-01 16:00:14 +04:00
|
|
|
|
|
|
|
/** @override */
|
|
|
|
public function getClobTypeDeclarationSql(array $field) {}
|
2009-05-27 22:54:40 +04:00
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
/* MOCK API */
|
2009-05-27 22:54:40 +04:00
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
public function setPrefersIdentityColumns($bool)
|
|
|
|
{
|
2009-03-30 23:43:05 +04:00
|
|
|
$this->_prefersIdentityColumns = $bool;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setPrefersSequences($bool)
|
|
|
|
{
|
|
|
|
$this->_prefersSequences = $bool;
|
2008-09-07 17:48:40 +04:00
|
|
|
}
|
2009-03-14 12:05:52 +03:00
|
|
|
|
|
|
|
public function setSequenceNextValSql($sql)
|
|
|
|
{
|
|
|
|
$this->_sequenceNextValSql = $sql;
|
|
|
|
}
|
2009-05-27 22:54:40 +04:00
|
|
|
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return 'mock';
|
|
|
|
}
|
2009-02-18 10:59:11 +03:00
|
|
|
}
|