Skip to content

Commit 1bf013d

Browse files
committed
docs: Update documentation
# Conflicts: # user_guide_src/source/changelogs/v4.8.0.rst
1 parent 0e25da9 commit 1bf013d

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎user_guide_src/source/changelogs/v4.8.0.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Query Builder
209209
-------------
210210

211211
- Added ``whereColumn()`` and ``orWhereColumn()`` to compare one column to another column while protecting identifiers by default. See :ref:`query-builder-where-column`.
212+
- Added support for incrementing/decrementing multiple columns in a single call to ``BaseBuilder::increment()`` and ``decrement()`` as well as driver-specific builders.
212213

213214
Forge
214215
-----

‎user_guide_src/source/database/query_builder.rst‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,22 +2087,26 @@ Class Reference
20872087

20882088
.. php:method:: increment($column[, $value = 1])
20892089
2090-
:param string $column: The name of the column to increment
2091-
:param int $value: The amount to increment in the column
2090+
:param array|string $column: The name of the column(s) to increment. If multiple, then should be an array of column names with their values.
2091+
:param int $value: The amount to increment in the column (will be ignored if $column is an array)
20922092

20932093
Increments the value of a field by the specified amount. If the field
20942094
is not a numeric field, like a ``VARCHAR``, it will likely be replaced
20952095
with ``$value``.
20962096

2097+
.. note:: Prior to v4.8.0, only single columns could be incremented.
2098+
20972099
.. php:method:: decrement($column[, $value = 1])
20982100
2099-
:param string $column: The name of the column to decrement
2100-
:param int $value: The amount to decrement in the column
2101+
:param array|string $column: The name of the column(s) to decrement. If multiple, then should be an array of column names with their values.
2102+
:param int $value: The amount to decrement in the column (will be ignored if $column is an array)
21012103

21022104
Decrements the value of a field by the specified amount. If the field
21032105
is not a numeric field, like a ``VARCHAR``, it will likely be replaced
21042106
with ``$value``.
21052107

2108+
.. note:: Prior to v4.8.0, only single columns could be decremented.
2109+
21062110
.. php:method:: truncate()
21072111
21082112
:returns: ``true`` on success, ``false`` on failure, string on test mode

0 commit comments

Comments
 (0)