@@ -1612,18 +1612,20 @@ Class Reference
1612
1612
1613
1613
.. php :method :: updateBatch([$set = null[, $constraints = null[, $batchSize = 100]]])
1614
1614
1615
- :param array $set: Field name, or an associative array of field/value pairs
1616
- :param mixed $constraints: The field or fields used as keys to update on.
1615
+ :param array|object|null $set: Field name, or an associative array of field/value pairs
1616
+ :param array|RawSql|string|null $constraints: The field or fields used as keys to update on.
1617
1617
:param int $batchSize: Count of conditions to group in a single query
1618
1618
:returns: Number of rows updated or ``false `` on failure
1619
1619
:rtype: int|false
1620
1620
1621
+ .. note :: Since v4.3.0, the types of the parameters ``$set`` and ``$constraints`` have changed.
1622
+
1621
1623
Compiles and executes batch ``UPDATE `` statements.
1622
- The ``$constraints `` parameter takes a comma delimited string of columns, an array, an associative array, or RawSql.
1624
+ The ``$constraints `` parameter takes a comma delimited string of columns, an array, an associative array, or `` RawSql `` .
1623
1625
1624
1626
.. note :: When more than ``$batchSize`` field/value pairs are provided,
1625
- multiple queries will be executed, each handling up to ``$batchSize ``
1626
- field/value pairs. If we set ``$batchSize `` to 0, then all field/value
1627
+ multiple queries will be executed, each handling up to ``$batchSize ``
1628
+ field/value pairs. If we set ``$batchSize `` to 0, then all field/value
1627
1629
pairs will be executed in one query.
1628
1630
1629
1631
.. php :method :: updateFields($set, [$addToDefault = false, [$ignore = null]])
@@ -1634,6 +1636,8 @@ Class Reference
1634
1636
:returns: ``BaseBuilder `` instance (method chaining)
1635
1637
:rtype: ``BaseBuilder ``
1636
1638
1639
+ .. versionadded :: 4.3.0
1640
+
1637
1641
Used with ``updateBatch() `` and ``upsertBatch() `` methods. This defines the fields which will be updated.
1638
1642
1639
1643
.. php :method :: onConstraint($set)
@@ -1642,6 +1646,8 @@ Class Reference
1642
1646
:returns: ``BaseBuilder `` instance (method chaining)
1643
1647
:rtype: ``BaseBuilder ``
1644
1648
1649
+ .. versionadded :: 4.3.0
1650
+
1645
1651
Used with ``updateBatch() `` and ``upsertBatch() `` methods. This takes a comma delimited string of columns, and array, associative array, or RawSql.
1646
1652
1647
1653
.. php :method :: setData($set, [$escape = null, [$alias = '']])
@@ -1652,6 +1658,8 @@ Class Reference
1652
1658
:returns: ``BaseBuilder `` instance (method chaining)
1653
1659
:rtype: ``BaseBuilder ``
1654
1660
1661
+ .. versionadded :: 4.3.0
1662
+
1655
1663
Used for ``*Batch() `` methods to set data for insert, update, upsert.
1656
1664
1657
1665
.. php :method :: setAlias($alias)
@@ -1660,6 +1668,8 @@ Class Reference
1660
1668
:returns: ``BaseBuilder `` instance (method chaining)
1661
1669
:rtype: ``BaseBuilder ``
1662
1670
1671
+ .. versionadded :: 4.3.0
1672
+
1663
1673
This allows setting an alias for the psuedo table generated with ``setData() ``.
1664
1674
1665
1675
.. php :method :: setUpdateBatch($key[, $value = ''[, $escape = null]])
0 commit comments