Skip to content

Commit

Permalink
[docs] Apply patch for #1206 to stables
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Dec 16, 2024
1 parent 525680e commit dd17877
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions versioned_docs/version-4.1/apis/core/dml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $DB->get_record_sql(

Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:

- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.

Expand Down Expand Up @@ -648,7 +648,7 @@ try {
// Assuming the both inserts work, we get to the following line.
$transaction->allow_commit();

} catch(Exception $e) {
} catch (Exception $e) {
$transaction->rollback($e);
}
```
Expand Down Expand Up @@ -873,7 +873,7 @@ public function sql_compare_text(

```php title="Example"
$comparedescription = $DB->sql_compare_text('description');
$comparedescription = $DB->sql_compare_text(':description');
$comparedescriptionplaceholder = $DB->sql_compare_text(':description');
$todogroups = $DB->get_records_sql(
"SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}",
[
Expand Down
6 changes: 3 additions & 3 deletions versioned_docs/version-4.3/apis/core/dml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $DB->get_record_sql(

Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:

- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.

Expand Down Expand Up @@ -648,7 +648,7 @@ try {
// Assuming the both inserts work, we get to the following line.
$transaction->allow_commit();

} catch(Exception $e) {
} catch (Exception $e) {
$transaction->rollback($e);
}
```
Expand Down Expand Up @@ -873,7 +873,7 @@ public function sql_compare_text(

```php title="Example"
$comparedescription = $DB->sql_compare_text('description');
$comparedescription = $DB->sql_compare_text(':description');
$comparedescriptionplaceholder = $DB->sql_compare_text(':description');
$todogroups = $DB->get_records_sql(
"SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}",
[
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.4/apis/core/dml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ $DB->get_record_sql(

Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:

- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.

Expand Down Expand Up @@ -648,7 +648,7 @@ try {
// Assuming the both inserts work, we get to the following line.
$transaction->allow_commit();

} catch(Exception $e) {
} catch (Exception $e) {
$transaction->rollback($e);
}
```
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.5/apis/core/dml/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ try {
// Assuming the both inserts work, we get to the following line.
$transaction->allow_commit();

} catch(Exception $e) {
} catch (Exception $e) {
$transaction->rollback($e);
}
```
Expand Down

0 comments on commit dd17877

Please sign in to comment.