改名
This commit is contained in:
+7
-5
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
|||||||
namespace Database;
|
namespace Database;
|
||||||
|
|
||||||
|
|
||||||
use Note\Inject;
|
|
||||||
use Database\Affair\BeginTransaction;
|
use Database\Affair\BeginTransaction;
|
||||||
use Database\Affair\Commit;
|
use Database\Affair\Commit;
|
||||||
use Database\Affair\Rollback;
|
use Database\Affair\Rollback;
|
||||||
@@ -23,6 +22,7 @@ use Kiri\Abstracts\Config;
|
|||||||
use Kiri\Events\EventProvider;
|
use Kiri\Events\EventProvider;
|
||||||
use Kiri\Exception\NotFindClassException;
|
use Kiri\Exception\NotFindClassException;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
|
use Note\Inject;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Server\Events\OnWorkerExit;
|
use Server\Events\OnWorkerExit;
|
||||||
use Server\Events\OnWorkerStop;
|
use Server\Events\OnWorkerStop;
|
||||||
@@ -61,6 +61,7 @@ class Connection extends Component
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public array $slaveConfig = [];
|
public array $slaveConfig = [];
|
||||||
|
public array $attributes = [];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -197,10 +198,11 @@ class Connection extends Component
|
|||||||
public function masterInstance(): PDO
|
public function masterInstance(): PDO
|
||||||
{
|
{
|
||||||
return $this->connections()->get([
|
return $this->connections()->get([
|
||||||
'cds' => $this->cds,
|
'cds' => $this->cds,
|
||||||
'username' => $this->username,
|
'username' => $this->username,
|
||||||
'password' => $this->password,
|
'password' => $this->password,
|
||||||
'database' => $this->database
|
'attributes' => $this->attributes,
|
||||||
|
'dbname' => $this->database
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user