8000 update 替换底层Connection 在查询事件结束时执行事件将$statement传递出去使用 · APIJSON/hyperf-APIJSON@6a5a400 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a5a400

Browse files
committed
update 替换底层Connection 在查询事件结束时执行事件将$statement传递出去使用
该做法应能解决查询之后不能执行存储过程 & 方便转Json行为
1 parent 17e9b92 commit 6a5a400

File tree

3 files changed

+1244
-0
lines changed

3 files changed

+1244
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
4+
declare(strict_types=1);
5+
/**
6+
* @author kvnZero
7+
* @contact kvnZero@github.com
8+
* @time 2021/12/4 5:25 下午
9+
*/
10+
11+
namespace App\Event\ApiJson;
12+
13+
class StatementComplete
14+
{
15+
/**
16+
* The database connection instance.
17+
*
18+
* @var \Hyperf\Database\Connection
19+
*/
20+
public $connection;
21+
22+
/**
23+
* The PDO statement.
24+
*
25+
* @var \PDOStatement
26+
*/
27+
public $statement;
28+
29+
/**
30+
* Create a new event instance.
31+
*
32+
* @param \Hyperf\Database\Connection $connection
33+
* @param \PDOStatement $statement
34+
*/
35+
public function __construct($connection, $statement)
36+
{
37+
$this->statement = $statement;
38+
$this->connection = $connection;
39+
}
40+
}

0 commit comments

Comments
 (0)
0