Skip to content
Snippets Groups Projects
Commit 00ef1834 authored by Daniel Kurowski's avatar Daniel Kurowski Committed by Jiří Pudil
Browse files

add real to built-in types

parent da3be54e
No related branches found
No related tags found
1 merge request!45Add imprecise FloatType
......@@ -40,6 +40,11 @@ final class BuiltInType implements DatabaseType
return new self('numeric');
}
public static function real(): self
{
return new self('real');
}
public static function timestamp(): self
{
return new self('timestamp without time zone');
......
......@@ -47,6 +47,7 @@ final class TypeResolver
if (\class_exists(BigDecimal::class)) {
$this->addResolutionByTypeName(DecimalType::decimal());
$this->addResolutionByTypeName(DecimalType::numeric());
$this->addResolutionByTypeName(DecimalType::real());
}
if (\class_exists(Instant::class)) {
......
......@@ -33,6 +33,11 @@ final class DecimalType implements Type
return new self(BuiltInType::numeric());
}
public static function real(): self
{
return new self(BuiltInType::real());
}
public function getPhpType(): PhpType
{
return resolve(BigDecimal::class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment