Skip to content

Commit

Permalink
docs: removed statements from the documentation that could be taken t…
Browse files Browse the repository at this point in the history
…o mean "identifiers are escaped".
  • Loading branch information
ytetsuro committed Sep 26, 2021
1 parent 3884538 commit 9ac8f50
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ abstract protected function doInsert(array $data);
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values and identifiers
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
Expand Down Expand Up @@ -763,7 +763,7 @@ public function insert($data = null, bool $returnID = true)
* Compiles batch insert runs the queries, validating each row prior.
*
* @param array|null $set an associative array of insert values
* @param bool|null $escape Whether to escape values and identifiers
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
Expand Down
2 changes: 1 addition & 1 deletion system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ protected function _limit(string $sql, bool $offsetIgnore = false): string
*
* @param array|object|string $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values and identifiers
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ protected function doInsert(array $data)
* This methods works only with dbCalls
*
* @param array|null $set An associative array of insert values
* @param bool|null $escape Whether to escape values and identifiers
* @param bool|null $escape Whether to escape values
* @param int $batchSize The size of the batch to run
* @param bool $testing True means only number of records is returned, false will execute the query
*
Expand Down Expand Up @@ -559,7 +559,7 @@ public function builder(?string $table = null)
*
* @param mixed $key Field name, or an array of field/value pairs
* @param mixed $value Field value, if $key is a single field
* @param bool|null $escape Whether to escape values and identifiers
* @param bool|null $escape Whether to escape values
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/InsertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function testInsertBatchWithoutEscape()
$raw = 'INSERT INTO "jobs" ("description", "id", "name") VALUES (:description:,:id:,:name:), (:description.1:,:id.1:,:name.1:)';
$this->assertSame($raw, str_replace("\n", ' ', $query->getOriginalQuery()));

$expected = "INSERT INTO \"jobs\" (\"description\", \"id\", \"name\") VALUES (1 + 2,2,1 + 1), (2 + 2,3,2 + 1)";
$expected = 'INSERT INTO "jobs" ("description", "id", "name") VALUES (1 + 2,2,1 + 1), (2 + 2,3,2 + 1)';
$this->assertSame($expected, str_replace("\n", ' ', $query->getQuery()));
}

Expand Down
10 changes: 5 additions & 5 deletions user_guide_src/source/database/query_builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ Class Reference
:param mixed $key: Field name, or an array of field/value pairs
:param mixed $value: Field value, if $key is a single field
:param bool $escape: Whether to escape values and identifiers
:param bool $escape: Whether to escape values
:returns: ``BaseBuilder`` instance (method chaining)
:rtype: ``BaseBuilder``

Expand All @@ -1710,7 +1710,7 @@ Class Reference
.. php:method:: insert([$set = null[, $escape = null]])
:param array $set: An associative array of field/value pairs
:param bool $escape: Whether to escape values and identifiers
:param bool $escape: Whether to escape values
:returns: ``true`` on success, ``false`` on failure
:rtype: bool

Expand All @@ -1719,7 +1719,7 @@ Class Reference
.. php:method:: insertBatch([$set = null[, $escape = null[, $batch_size = 100]]])
:param array $set: Data to insert
:param bool $escape: Whether to escape values and identifiers
:param bool $escape: Whether to escape values
:param int $batch_size: Count of rows to insert at once
:returns: Number of rows inserted or ``false`` on failure
:rtype: int|false
Expand All @@ -1734,7 +1734,7 @@ Class Reference
:param mixed $key: Field name or an array of field/value pairs
:param string $value: Field value, if $key is a single field
:param bool $escape: Whether to escape values and identifiers
:param bool $escape: Whether to escape values
:returns: ``BaseBuilder`` instance (method chaining)
:rtype: ``BaseBuilder``

Expand Down Expand Up @@ -1768,7 +1768,7 @@ Class Reference
:param mixed $key: Field name or an array of field/value pairs
:param string $value: Field value, if $key is a single field
:param bool $escape: Whether to escape values and identifiers
:param bool $escape: Whether to escape values
:returns: ``BaseBuilder`` instance (method chaining)
:rtype: ``BaseBuilder``

Expand Down

0 comments on commit 9ac8f50

Please sign in to comment.