Skip to content

Commit

Permalink
Merge pull request #6 from ForMyMore/main
Browse files Browse the repository at this point in the history
将query和execute改为静态方法,以便可以使用DB::query和DB::execute调用
  • Loading branch information
walkor authored Mar 25, 2023
2 parents 6eabf39 + 44039cb commit 56174ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_ide_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function rollback(): void
* @throws \think\db\exception\BindParamException
* @throws \PDOException
*/
public function query(string $sql, array $bind = []): array
public static function query(string $sql, array $bind = []): array
{
/** @var \think\Db $instance */
return $instance->query($sql,$bind);
Expand All @@ -108,7 +108,7 @@ public function master(bool $readMaster = true)
* @throws \think\db\exception\BindParamException
* @throws \PDOException
*/
public function execute(string $sql, array $bind = []): int
public static function execute(string $sql, array $bind = []): int
{
/** @var \think\Db $instance */
return $instance->execute($sql,$bind);
Expand Down

0 comments on commit 56174ec

Please sign in to comment.