Skip to content

Commit ee4950a

Browse files
committed
opt code
1 parent 2fe2931 commit ee4950a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ActiveRecord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class ActiveRecord extends \rabbit\db\clickhouse\ActiveRecord
1818
*/
1919
public static function getDb(): ConnectionInterface
2020
{
21-
return getDI('click')->getConnection();
21+
return getDI('click')->get();
2222
}
2323
}

src/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Query extends BaseQuery
3131
public function createCommand($db = null)
3232
{
3333
if ($db === null) {
34-
$db = getDI('click')->getConnection();
34+
$db = getDI('click')->get();
3535
}
3636
[$sql, $params] = $db->getQueryBuilder()->build($this);
3737

0 commit comments

Comments
 (0)