- 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
@@ -39,7 +39,7 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
public string $database;
|
||||
|
||||
public string $username;
|
||||
|
||||
|
||||
public string $password;
|
||||
|
||||
public string $traceFile;
|
||||
@@ -51,7 +51,9 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
public function __construct(
|
||||
?string $server = null,
|
||||
?string $database = null,
|
||||
#[\SensitiveParameter]
|
||||
?string $username = null,
|
||||
#[\SensitiveParameter]
|
||||
?string $password = null,
|
||||
?int $port = null
|
||||
) {
|
||||
|
||||
@@ -38,7 +38,9 @@ class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||
public function __construct(
|
||||
?string $hostname = null,
|
||||
?string $database = null,
|
||||
#[\SensitiveParameter]
|
||||
?string $username = null,
|
||||
#[\SensitiveParameter]
|
||||
?string $password = null,
|
||||
?int $port = null,
|
||||
?string $charset = null
|
||||
|
||||
@@ -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