summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-02-09 22:35:08 +0100
committerAndrey Andreev <narf@devilix.net>2016-02-09 22:35:08 +0100
commit477e08f1d6726809660e4841f389493541f7bc07 (patch)
tree785b12b53c5e46e317def1768558f33445ab2b1f /user_guide_src/source/database
parent2342256c076502cbaca86fcff2a1dbbfc49a1900 (diff)
parent39967987ebcc79fc867c1f7fa8d69cc65801f594 (diff)
Merge branch '3.0-stable' into develop
Fixed conflicts: user_guide_src/source/overview/at_a_glance.rst
Diffstat (limited to 'user_guide_src/source/database')
-rw-r--r--user_guide_src/source/database/query_builder.rst18
1 files changed, 14 insertions, 4 deletions
diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst
index 5d9ae4592..3135f76da 100644
--- a/user_guide_src/source/database/query_builder.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -1433,15 +1433,20 @@ Class Reference
Compiles and executes an INSERT statement.
- .. php:method:: insert_batch([$table = ''[, $set = NULL[, $escape = NULL]]])
+ .. php:method:: insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]])
:param string $table: Table name
:param array $set: Data to insert
:param bool $escape: Whether to escape values and identifiers
+ :param int $batch_size: Count of rows to insert at once
:returns: Number of rows inserted or FALSE on failure
:rtype: mixed
- Compiles and executes batch INSERT statements.
+ Compiles and executes batch ``INSERT`` statements.
+
+ .. note:: When more than ``$batch_size`` rows are provided, multiple
+ ``INSERT`` queries will be executed, each trying to insert
+ up to ``$batch_size`` rows.
.. php:method:: set_insert_batch($key[, $value = ''[, $escape = NULL]])
@@ -1464,15 +1469,20 @@ Class Reference
Compiles and executes an UPDATE statement.
- .. php:method:: update_batch([$table = ''[, $set = NULL[, $value = NULL]]])
+ .. php:method:: update_batch($table[, $set = NULL[, $value = NULL[, $batch_size = 100]]])
:param string $table: Table name
:param array $set: Field name, or an associative array of field/value pairs
:param string $value: Field value, if $set is a single field
+ :param int $batch_size: Count of conditions to group in a single query
:returns: Number of rows updated or FALSE on failure
:rtype: mixed
- Compiles and executes batch UPDATE statements.
+ Compiles and executes batch ``UPDATE`` statements.
+
+ .. note:: When more than ``$batch_size`` field/value pairs are provided,
+ multiple queries will be executed, each handling up to
+ ``$batch_size`` field/value pairs.
.. php:method:: set_update_batch($key[, $value = ''[, $escape = NULL]])