1 | <?php |
||
20 | final class PreparedStatement |
||
21 | { |
||
22 | private $handler; |
||
23 | private $id; |
||
24 | private $bindCount; |
||
25 | private $bindMetadata; |
||
26 | private $metadata; |
||
27 | |||
28 | 21 | public function __construct(Handler $handler, int $id, int $bindCount, array $bindMetadata, array $metadata) |
|
36 | |||
37 | /** |
||
38 | * @param mixed ...$params |
||
39 | */ |
||
40 | 3 | public function execute(...$params) : Response |
|
41 | { |
||
42 | 3 | return $this->handler->handle( |
|
43 | 3 | ExecuteRequest::fromStatementId($this->id, $params) |
|
44 | ); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param mixed ...$params |
||
49 | */ |
||
50 | 6 | public function executeQuery(...$params) : SqlQueryResult |
|
61 | |||
62 | /** |
||
63 | * @param mixed ...$params |
||
64 | */ |
||
65 | 3 | public function executeUpdate(...$params) : SqlUpdateResult |
|
73 | |||
74 | 18 | public function close() : void |
|
78 | |||
79 | 3 | public function getId() : int |
|
83 | |||
84 | 3 | public function getBindCount() : int |
|
88 | |||
89 | 3 | public function getBindMetadata() : array |
|
93 | |||
94 | 3 | public function getMetadata() : array |
|
98 | } |
||
99 |