2008-08-01 18:46:14 +00:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 19:38:10 +00:00
|
|
|
namespace Doctrine\Tests\Mocks;
|
2009-01-04 16:15:32 +00:00
|
|
|
|
2009-01-22 19:38:10 +00:00
|
|
|
class DatabasePlatformMock extends \Doctrine\DBAL\Platforms\AbstractPlatform
|
2008-08-01 18:46:14 +00:00
|
|
|
{
|
2009-03-14 09:05:52 +00:00
|
|
|
private $_sequenceNextValSql = "";
|
2009-03-30 19:43:05 +00:00
|
|
|
private $_prefersIdentityColumns = true;
|
|
|
|
private $_prefersSequences = false;
|
2009-05-27 18:54:40 +00:00
|
|
|
|
2008-09-07 13:48:40 +00:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2008-08-31 18:27:16 +00:00
|
|
|
public function getNativeDeclaration(array $field) {}
|
2009-05-27 18:54:40 +00:00
|
|
|
|
2008-09-07 13:48:40 +00:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2008-08-01 18:46:14 +00:00
|
|
|
public function getPortableDeclaration(array $field) {}
|
2009-05-27 18:54:40 +00:00
|
|
|
|
2008-09-07 13:48:40 +00:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
2009-02-18 07:59:11 +00:00
|
|
|
public function prefersIdentityColumns()
|
|
|
|
{
|
2008-09-07 13:48:40 +00:00
|
|
|
return $this->_prefersIdentityColumns;
|
|
|
|
}
|
2009-01-07 17:46:02 +00:00
|
|
|
|
2009-03-30 19:43:05 +00:00
|
|
|
/**
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function prefersSequences()
|
|
|
|
{
|
|
|
|
return $this->_prefersSequences;
|
|
|
|
}
|
|
|
|
|
2009-03-14 09:05:52 +00:00
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getSequenceNextValSQL($sequenceName)
|
2009-03-14 09:05:52 +00:00
|
|
|
{
|
|
|
|
return $this->_sequenceNextValSql;
|
|
|
|
}
|
|
|
|
|
2009-09-05 02:44:45 +00:00
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getBooleanTypeDeclarationSQL(array $field) {}
|
2009-09-05 02:44:45 +00:00
|
|
|
|
2009-01-07 17:46:02 +00:00
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getIntegerTypeDeclarationSQL(array $field) {}
|
2009-01-07 17:46:02 +00:00
|
|
|
|
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getBigIntTypeDeclarationSQL(array $field) {}
|
2009-01-07 17:46:02 +00:00
|
|
|
|
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getSmallIntTypeDeclarationSQL(array $field) {}
|
2009-01-07 17:46:02 +00:00
|
|
|
|
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) {}
|
2009-01-07 17:46:02 +00:00
|
|
|
|
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getVarcharTypeDeclarationSQL(array $field) {}
|
2011-11-12 12:56:44 +01:00
|
|
|
|
2009-10-01 12:00:14 +00:00
|
|
|
/** @override */
|
2010-03-05 16:35:00 +00:00
|
|
|
public function getClobTypeDeclarationSQL(array $field) {}
|
2009-05-27 18:54:40 +00:00
|
|
|
|
2008-09-07 13:48:40 +00:00
|
|
|
/* MOCK API */
|
2009-05-27 18:54:40 +00:00
|
|
|
|
2008-09-07 13:48:40 +00:00
|
|
|
public function setPrefersIdentityColumns($bool)
|
|
|
|
{
|
2009-03-30 19:43:05 +00:00
|
|
|
$this->_prefersIdentityColumns = $bool;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setPrefersSequences($bool)
|
|
|
|
{
|
|
|
|
$this->_prefersSequences = $bool;
|
2008-09-07 13:48:40 +00:00
|
|
|
}
|
2009-03-14 09:05:52 +00:00
|
|
|
|
|
|
|
public function setSequenceNextValSql($sql)
|
|
|
|
{
|
|
|
|
$this->_sequenceNextValSql = $sql;
|
|
|
|
}
|
2009-05-27 18:54:40 +00:00
|
|
|
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return 'mock';
|
|
|
|
}
|
2010-06-06 22:41:05 +02:00
|
|
|
|
|
|
|
protected function initializeDoctrineTypeMappings()
|
|
|
|
{
|
2011-11-12 12:56:44 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Gets the SQL Snippet used to declare a BLOB column type.
|
|
|
|
*/
|
|
|
|
public function getBlobTypeDeclarationSQL(array $field)
|
|
|
|
{
|
|
|
|
throw DBALException::notSupported(__METHOD__);
|
2010-06-06 22:41:05 +02:00
|
|
|
}
|
2009-02-18 07:59:11 +00:00
|
|
|
}
|