- A lot of work done on bug fixing. Added a new SQLite adapter
This commit is contained in:
1 parent
667df92e52
commit
c14644cdda
28 files changed
+727
-234
No files matched your search
+12
-2
@@ -2,11 +2,18 @@
|
||||
|
||||
namespace Ulmus\Adapter;
|
||||
|
||||
use Ulmus\Entity\InformationSchema\Table;
|
||||
use Ulmus\QueryBuilder;
|
||||
use Ulmus\Repository;
|
||||
use Ulmus\Common\PdoObject;
|
||||
|
||||
use Ulmus\Exception\AdapterConfigurationException;
|
||||
use Ulmus\Migration\FieldDefinition;
|
||||
|
||||
class MySQL implements AdapterInterface {
|
||||
use DefaultAdapterTrait;
|
||||
|
||||
const DSN_PREFIX = "mysql";
|
||||
|
||||
public string $hostname;
|
||||
|
||||
@@ -17,7 +24,7 @@ class MySQL implements AdapterInterface {
|
||||
public string $password;
|
||||
|
||||
public string $charset = "utf8mb4";
|
||||
|
||||
|
||||
public ? string $socket;
|
||||
|
||||
public int $port = 3306;
|
||||
@@ -68,6 +75,9 @@ class MySQL implements AdapterInterface {
|
||||
catch(PDOException $ex){
|
||||
throw $ex;
|
||||
}
|
||||
finally {
|
||||
$this->password = str_repeat('*', strlen($this->password));
|
||||
}
|
||||
|
||||
return $pdo;
|
||||
}
|
||||
@@ -91,7 +101,7 @@ class MySQL implements AdapterInterface {
|
||||
$parts[] = "charset={$this->charset}";
|
||||
}
|
||||
|
||||
return "mysql:" . implode(';', $parts);
|
||||
return static::DSN_PREFIX . ":" . implode(';', $parts);
|
||||
}
|
||||
|
||||
public function setup(array $configuration) : void
|
||||
|
||||
Reference in new issue
Block a user