Skip to content

Commit f4b83b4

Browse files
committed
Update Documentation
1 parent 7110fb9 commit f4b83b4

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

system/Database/BaseBuilder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,8 @@ protected function _insertBatch(string $table, array $keys, array $values): stri
19931993
* @param mixed $key
19941994
*
19951995
* @return $this|null
1996+
*
1997+
* @deprecated
19961998
*/
19971999
public function setInsertBatch($key, string $value = '', ?bool $escape = null)
19982000
{
@@ -2285,7 +2287,7 @@ protected function validateUpdate(): bool
22852287
/**
22862288
* Sets data and calls batchExecute to run queryies
22872289
*
2288-
* @param array|object|null $set a dataset or select query
2290+
* @param array|object|null $set a dataset or select query
22892291
* @param array|RawSql|string|null $constraints
22902292
*
22912293
* @return false|int|string[] Number of rows affected or FALSE on failure, SQL array when testMode
@@ -2385,6 +2387,8 @@ protected function _updateBatch(string $table, array $keys, array $values): stri
23852387
* @return $this
23862388
*
23872389
* @throws DatabaseException
2390+
*
2391+
* @deprecated
23882392
*/
23892393
public function setUpdateBatch($key, string $index = '', ?bool $escape = null)
23902394
{

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ Others
4646
- ``CITestStreamFilter::$buffer = ''`` no longer causes the filter to be registered to listen for streams. Now there
4747
is a ``CITestStreamFilter::registration()`` method for this. See :ref:`upgrade-430-stream-filter` for details.
4848
- The data structure returned by ``BaseConnection::getForeignKeyData()`` has been changed.
49-
- The second parameter ``$index`` of ``BaseBuilder::updateBatch()`` has changed to ``$constraints``. It now accepts an array, string, or ``RawSql``.
50-
- The ``$set`` parameter of ``BaseBuilder::insertBatch()`` and ``BaseBuilder::updateBatch()`` now accepts an object of a single row of data.
5149

5250
.. _v430-interface-changes:
5351

@@ -92,6 +90,9 @@ Others
9290
- The return type of ``CodeIgniter\Database\Database::loadForge()`` has been changed to ``Forge``.
9391
- The return type of ``CodeIgniter\Database\Database::loadUtils()`` has been changed to ``BaseUtils``.
9492
- Parameter ``$column`` has changed in ``Table::dropForeignKey()`` to ``$foreignName``.
93+
- The second parameter ``$index`` of ``BaseBuilder::updateBatch()`` has changed to ``$constraints``. It now accepts an array, string, or ``RawSql``.
94+
- The ``$set`` parameter of ``BaseBuilder::insertBatch()`` and ``BaseBuilder::updateBatch()`` now accepts an object of a single row of data.
95+
- The second and third parameters of ``BaseBuilder::_updateBatch()`` has changed. Instead of ``$values, $index``, it is now ``$keys, $values``.
9596

9697
Enhancements
9798
************
@@ -176,6 +177,7 @@ Deprecations
176177

177178
- ``RouteCollection::localizeRoute()`` is deprecated.
178179
- ``RouteCollection::fillRouteParams()`` is deprecated. Use ``RouteCollection::buildReverseRoute()`` instead.
180+
- ``BaseBuilder::setUpdateBatch()`` and ``BaseBuilder::setInsertBatch()`` are depreciated. Use ``BaseBuilder::setData()`` instead.
179181

180182
Bugs Fixed
181183
**********

user_guide_src/source/database/query_builder.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,16 +1588,6 @@ Class Reference
15881588
``INSERT`` queries will be executed, each trying to insert
15891589
up to ``$batch_size`` rows.
15901590

1591-
.. php:method:: setInsertBatch($key[, $value = ''[, $escape = null]])
1592-
1593-
:param mixed $key: Field name or an array of field/value pairs
1594-
:param string $value: Field value, if $key is a single field
1595-
:param bool $escape: Whether to escape values
1596-
:returns: ``BaseBuilder`` instance (method chaining)
1597-
:rtype: ``BaseBuilder``
1598-
1599-
Adds field/value pairs to be inserted in a table later via ``insertBatch()``.
1600-
16011591
.. php:method:: update([$set = null[, $where = null[, $limit = null]]])
16021592
16031593
:param array $set: An associative array of field/value pairs
@@ -1660,16 +1650,6 @@ Class Reference
16601650

16611651
This allows setting an alias for the psuedo table generated with ``setData()``.
16621652

1663-
.. php:method:: setUpdateBatch($key[, $value = ''[, $escape = null]])
1664-
1665-
:param mixed $key: Field name or an array of field/value pairs
1666-
:param string $value: Field value, if $key is a single field
1667-
:param bool $escape: Whether to escape values
1668-
:returns: ``BaseBuilder`` instance (method chaining)
1669-
:rtype: ``BaseBuilder``
1670-
1671-
Adds field/value pairs to be updated in a table later via ``updateBatch()``.
1672-
16731653
.. php:method:: replace([$set = null])
16741654
16751655
:param array $set: An associative array of field/value pairs

0 commit comments

Comments
 (0)