改名
This commit is contained in:
+7
-1
@@ -197,6 +197,13 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function masterInstance(): PDO
|
public function masterInstance(): PDO
|
||||||
{
|
{
|
||||||
|
var_dump([
|
||||||
|
'cds' => $this->cds,
|
||||||
|
'username' => $this->username,
|
||||||
|
'password' => $this->password,
|
||||||
|
'attributes' => $this->attributes,
|
||||||
|
'dbname' => $this->database
|
||||||
|
]);
|
||||||
return $this->connections()->get([
|
return $this->connections()->get([
|
||||||
'cds' => $this->cds,
|
'cds' => $this->cds,
|
||||||
'username' => $this->username,
|
'username' => $this->username,
|
||||||
@@ -212,7 +219,6 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function slaveInstance(): PDO
|
public function slaveInstance(): PDO
|
||||||
{
|
{
|
||||||
var_dump($this->slaveConfig);
|
|
||||||
if (empty($this->slaveConfig) || Db::transactionsActive()) {
|
if (empty($this->slaveConfig) || Db::transactionsActive()) {
|
||||||
return $this->masterInstance();
|
return $this->masterInstance();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user