|
@@ 892-900 (lines=9) @@
|
| 889 |
|
* @param array $data |
| 890 |
|
* @return PDOStatement |
| 891 |
|
*/ |
| 892 |
|
public function insertBatch($table, $data=[]): PDOStatement |
| 893 |
|
{ |
| 894 |
|
// Get the generated values and sql string |
| 895 |
|
list($sql, $data) = $this->driver->insertBatch($table, $data); |
| 896 |
|
|
| 897 |
|
return ( ! is_null($sql)) |
| 898 |
|
? $this->_run('', $table, $sql, $data) |
| 899 |
|
: NULL; |
| 900 |
|
} |
| 901 |
|
|
| 902 |
|
/** |
| 903 |
|
* Creates an update clause, and executes it |
|
@@ 928-936 (lines=9) @@
|
| 925 |
|
* @param string $where |
| 926 |
|
* @return int|null |
| 927 |
|
*/ |
| 928 |
|
public function updateBatch($table, $data, $where) |
| 929 |
|
{ |
| 930 |
|
// Get the generated values and sql string |
| 931 |
|
list($sql, $data) = $this->driver->updateBatch($table, $data, $where); |
| 932 |
|
|
| 933 |
|
return ( ! is_null($sql)) |
| 934 |
|
? $this->_run('', $table, $sql, $data) |
| 935 |
|
: NULL; |
| 936 |
|
} |
| 937 |
|
|
| 938 |
|
/** |
| 939 |
|
* Insertion with automatic overwrite, rather than attempted duplication |