|
@@ -11,7 +11,6 @@ use PhpDevCommunity\PaperORM\Schema\SqliteSchema;
|
|
|
|
|
|
|
|
final class SqliteDriver implements DriverInterface
|
|
final class SqliteDriver implements DriverInterface
|
|
|
{
|
|
{
|
|
|
- private string $databaseName;
|
|
|
|
|
public function connect(
|
|
public function connect(
|
|
|
#[SensitiveParameter]
|
|
#[SensitiveParameter]
|
|
|
array $params
|
|
array $params
|
|
@@ -21,7 +20,6 @@ final class SqliteDriver implements DriverInterface
|
|
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
|
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- $this->databaseName = $params['path'] ?? '';
|
|
|
|
|
return new PaperPDO(
|
|
return new PaperPDO(
|
|
|
$this->constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])),
|
|
$this->constructPdoDsn(array_intersect_key($params, ['path' => true, 'memory' => true])),
|
|
|
$params['user'] ?? '',
|
|
$params['user'] ?? '',
|
|
@@ -56,9 +54,4 @@ final class SqliteDriver implements DriverInterface
|
|
|
{
|
|
{
|
|
|
return new SqliteSchema();
|
|
return new SqliteSchema();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- public function getDatabaseName(): string
|
|
|
|
|
- {
|
|
|
|
|
- return $this->databaseName;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|