- Added caching mechanism as an event listener
This commit is contained in:
1 parent
b601939459
commit
9eed2fe1a8
25 files changed
+607
-402
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Ulmus\Adapter;
|
||||
|
||||
use Ulmus\Migration\FieldDefinition;
|
||||
use Ulmus\Entity;
|
||||
|
||||
class SqlFieldMapper
|
||||
{
|
||||
@@ -42,7 +43,7 @@ class SqlFieldMapper
|
||||
switch($type) {
|
||||
case "bool":
|
||||
$this->type = "TINYINT";
|
||||
$length = 1;
|
||||
$this->length = 1;
|
||||
break;
|
||||
|
||||
case "array":
|
||||
@@ -52,6 +53,7 @@ class SqlFieldMapper
|
||||
case "string":
|
||||
if ($length && $length <= 255) {
|
||||
$this->type = "VARCHAR";
|
||||
$this->length = $length;
|
||||
break;
|
||||
}
|
||||
elseif (! $length || ( $length <= 65535 ) ) {
|
||||
@@ -74,11 +76,13 @@ class SqlFieldMapper
|
||||
|
||||
case "float":
|
||||
$this->type = "DOUBLE";
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->type = strtoupper($type);
|
||||
break;
|
||||
if ($length) {
|
||||
$this->length = $length;
|
||||
}
|
||||
|
||||
$this->type ??= strtoupper($type);
|
||||
}
|
||||
|
||||
$this->postProcess();
|
||||
|
||||
Reference in new issue
Block a user