@@ 902-910 (lines=9) @@ | ||
899 | * @param array $data |
|
900 | * @return PDOStatement |
|
901 | */ |
|
902 | public function insertBatch($table, $data=[]): PDOStatement |
|
903 | { |
|
904 | // Get the generated values and sql string |
|
905 | list($sql, $data) = $this->driver->insertBatch($table, $data); |
|
906 | ||
907 | return ( ! is_null($sql)) |
|
908 | ? $this->_run('', $table, $sql, $data) |
|
909 | : NULL; |
|
910 | } |
|
911 | ||
912 | /** |
|
913 | * Creates an update clause, and executes it |
|
@@ 938-946 (lines=9) @@ | ||
935 | * @param string $where |
|
936 | * @return int|null |
|
937 | */ |
|
938 | public function updateBatch($table, $data, $where) |
|
939 | { |
|
940 | // Get the generated values and sql string |
|
941 | list($sql, $data) = $this->driver->updateBatch($table, $data, $where); |
|
942 | ||
943 | return ( ! is_null($sql)) |
|
944 | ? $this->_run('', $table, $sql, $data) |
|
945 | : NULL; |
|
946 | } |
|
947 | ||
948 | /** |
|
949 | * Insertion with automatic overwrite, rather than attempted duplication |