diff --git a/system/BaseModel.php b/system/BaseModel.php index 29c6d1075949..fb3b8549f856 100644 --- a/system/BaseModel.php +++ b/system/BaseModel.php @@ -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 * @@ -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 * diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index 295105e54cf6..549e9ec180a0 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -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 */ diff --git a/system/Model.php b/system/Model.php index 580c691247f6..5c008053058f 100644 --- a/system/Model.php +++ b/system/Model.php @@ -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 * @@ -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 */ diff --git a/tests/system/Database/Builder/InsertTest.php b/tests/system/Database/Builder/InsertTest.php index c314db0a467e..d9c0c79e11e6 100644 --- a/tests/system/Database/Builder/InsertTest.php +++ b/tests/system/Database/Builder/InsertTest.php @@ -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())); } diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 26fcba73e4ee..dec9b65570b3 100755 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -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`` @@ -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 @@ -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 @@ -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`` @@ -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``