- A lot of work done on bug fixing. Added a new SQLite adapter

This commit is contained in:
mcndave committed 2022-01-28 16:37:35 +00:00
1 parent 667df92e52
commit c14644cdda
28 files changed
+727 -234

No files matched your search

+9 -2
View File
@@ -2,6 +2,7 @@
namespace Ulmus\Query;
use Ulmus\Adapter\AdapterInterface;
use Ulmus\Annotation,
Ulmus\Common\EntityField;
@@ -17,7 +18,13 @@ class Alter extends Fragment {
public bool $skipExisting = true;
public array $fieldList;
public array $fieldList;
public AdapterInterface $adapter;
public function __construct(AdapterInterface $adapter) {
$this->adapter = $adapter;
}
public function render() : string
{
@@ -29,7 +36,7 @@ class Alter extends Fragment {
public function renderFields() : string
{
return "(" . PHP_EOL . implode("," . PHP_EOL, array_map(function($field) {
return " " . EntityField::generateAlterColumn($field);
return " " . EntityField::generateAlterColumn($this->adapter, $field);
}, $this->fieldList)) . PHP_EOL . ")";
}
}