This commit is contained in:
2020-09-11 17:59:38 +08:00
parent 45aaf011f9
commit 4dc451fe7a
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -250,10 +250,7 @@ class Connection extends Component
*/ */
public function createCommand($sql = null, $attributes = []) public function createCommand($sql = null, $attributes = [])
{ {
$command = new Command([ $command = new Command(['db' => $this, 'sql' => $sql]);
'db' => $this
]);
$command->setSql($sql);
return $command->bindValues($attributes); return $command->bindValues($attributes);
} }
+1 -1
View File
@@ -112,7 +112,7 @@ class Db
} }
/** /**
* @param Connection $db * @param Connection|null $db
* @return array|mixed * @return array|mixed
* @throws Exception * @throws Exception
*/ */