|
4 | 4 |
|
5 | 5 | namespace Yiisoft\Db\Oracle; |
6 | 6 |
|
7 | | -use JsonException; |
8 | | -use Yiisoft\Db\Exception\Exception; |
9 | 7 | use Yiisoft\Db\Exception\InvalidArgumentException; |
10 | | -use Yiisoft\Db\Exception\InvalidConfigException; |
11 | 8 | use Yiisoft\Db\Exception\NotSupportedException; |
12 | 9 | use Yiisoft\Db\Expression\Expression; |
13 | 10 | use Yiisoft\Db\Query\QueryInterface; |
|
22 | 19 | */ |
23 | 20 | final class DMLQueryBuilder extends AbstractDMLQueryBuilder |
24 | 21 | { |
25 | | - /** |
26 | | - * @throws Exception |
27 | | - * @throws InvalidArgumentException |
28 | | - * @throws InvalidConfigException |
29 | | - * @throws NotSupportedException |
30 | | - */ |
31 | | - public function batchInsert(string $table, array $columns, iterable $rows, array &$params = []): string |
| 22 | + public function insertBatch(string $table, iterable $rows, array $columns = [], array &$params = []): string |
32 | 23 | { |
33 | 24 | if (!is_array($rows)) { |
34 | 25 | $rows = $this->prepareTraversable($rows); |
@@ -58,23 +49,13 @@ public function batchInsert(string $table, array $columns, iterable $rows, array |
58 | 49 | return 'INSERT ALL' . $tableAndColumns . implode($tableAndColumns, $values) . ' SELECT 1 FROM SYS.DUAL'; |
59 | 50 | } |
60 | 51 |
|
61 | | - /** |
62 | | - * @throws Exception |
63 | | - * @throws NotSupportedException |
64 | | - */ |
65 | 52 | public function insertWithReturningPks(string $table, QueryInterface|array $columns, array &$params = []): string |
66 | 53 | { |
67 | 54 | throw new NotSupportedException(__METHOD__ . ' is not supported by Oracle.'); |
68 | 55 | } |
69 | 56 |
|
70 | 57 | /** |
71 | 58 | * @link https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm#SQLRF01606 |
72 | | - * |
73 | | - * @throws Exception |
74 | | - * @throws InvalidArgumentException |
75 | | - * @throws InvalidConfigException |
76 | | - * @throws JsonException |
77 | | - * @throws NotSupportedException |
78 | 59 | */ |
79 | 60 | public function upsert( |
80 | 61 | string $table, |
|
0 commit comments