Fixed documentation for Doctrine\Tests\DbalTypes
This commit is contained in:
parent
ad967e8e22
commit
76f2ba50eb
@ -7,26 +7,41 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
|
|||||||
|
|
||||||
class NegativeToPositiveType extends Type
|
class NegativeToPositiveType extends Type
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
return 'negative_to_positive';
|
return 'negative_to_positive';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
|
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
|
return $platform->getIntegerTypeDeclarationSQL($fieldDeclaration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function canRequireSQLConversion()
|
public function canRequireSQLConversion()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
|
public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
return 'ABS(' . $sqlExpr . ')';
|
return 'ABS(' . $sqlExpr . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function convertToPHPValueSQL($sqlExpr, $platform)
|
public function convertToPHPValueSQL($sqlExpr, $platform)
|
||||||
{
|
{
|
||||||
return '-(' . $sqlExpr . ')';
|
return '-(' . $sqlExpr . ')';
|
||||||
|
@ -7,21 +7,33 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
|
|||||||
|
|
||||||
class UpperCaseStringType extends StringType
|
class UpperCaseStringType extends StringType
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
return 'upper_case_string';
|
return 'upper_case_string';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function canRequireSQLConversion()
|
public function canRequireSQLConversion()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
|
public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
return 'UPPER(' . $sqlExpr . ')';
|
return 'UPPER(' . $sqlExpr . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function convertToPHPValueSQL($sqlExpr, $platform)
|
public function convertToPHPValueSQL($sqlExpr, $platform)
|
||||||
{
|
{
|
||||||
return 'LOWER(' . $sqlExpr . ')';
|
return 'LOWER(' . $sqlExpr . ')';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user