Skip to content

Commit dc5c989

Browse files
committed
Improve Acrolinx score for SQL input & output
1 parent 2fb7243 commit dc5c989

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

articles/azure-functions/functions-bindings-azure-sql-input.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public class ToDoItem {
289289
<a id="http-trigger-get-multiple-items-java"></a>
290290
### HTTP trigger, get multiple rows
291291

292-
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query and returns the results in the HTTP response.
292+
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query and returns the results in the HTTP response.
293293

294294
```java
295295
package com.function;
@@ -327,7 +327,7 @@ public class GetToDoItems {
327327
<a id="http-trigger-look-up-id-from-query-string-java"></a>
328328
### HTTP trigger, get row by ID from query string
329329

330-
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query filtered by a parameter from the query string and returns the row in the HTTP response.
330+
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query, which is filtered by a parameter from the query string, and it returns the row in the HTTP response.
331331

332332
```java
333333
public class GetToDoItem {
@@ -354,7 +354,7 @@ public class GetToDoItem {
354354
<a id="http-trigger-delete-one-or-multiple-rows-java"></a>
355355
### HTTP trigger, delete rows
356356

357-
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
357+
The following example shows a SQL input binding in a Java function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It executes a stored procedure with input from the HTTP request query parameter.
358358

359359
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
360360

@@ -402,7 +402,7 @@ The examples refer to a database table:
402402
<a id="http-trigger-get-multiple-items-javascript"></a>
403403
### HTTP trigger, get multiple rows
404404

405-
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query and returns the results in the HTTP response.
405+
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query and returns the results in the HTTP response.
406406

407407
::: zone-end
408408
::: zone pivot="programming-language-typescript"
@@ -477,7 +477,7 @@ module.exports = async function (context, req, todoItems) {
477477
<a id="http-trigger-look-up-id-from-query-string-javascript"></a>
478478
### HTTP trigger, get row by ID from query string
479479

480-
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query filtered by a parameter from the query string and returns the row in the HTTP response.
480+
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query, which is filtered by a parameter from the query string, and it returns the row in the HTTP response.
481481

482482
::: zone-end
483483
::: zone pivot="programming-language-typescript"
@@ -553,7 +553,7 @@ module.exports = async function (context, req, todoItem) {
553553
<a id="http-trigger-delete-one-or-multiple-rows-javascript"></a>
554554
### HTTP trigger, delete rows
555555

556-
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
556+
The following example shows a SQL input binding that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It executes a stored procedure with input from the HTTP request query parameter.
557557

558558
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
559559

@@ -644,7 +644,7 @@ The examples refer to a database table:
644644
<a id="http-trigger-get-multiple-items-powershell"></a>
645645
### HTTP trigger, get multiple rows
646646

647-
The following example shows a SQL input binding in a function.json file and a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query and returns the results in the HTTP response.
647+
The following example shows a SQL input binding in a function.json file and a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query and returns the results in the HTTP response.
648648

649649
The following is binding data in the function.json file:
650650

@@ -693,7 +693,7 @@ Push-OutputBinding -Name res -Value ([HttpResponseContext]@{
693693
<a id="http-trigger-look-up-id-from-query-string-powershell"></a>
694694
### HTTP trigger, get row by ID from query string
695695

696-
The following example shows a SQL input binding in a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query filtered by a parameter from the query string and returns the row in the HTTP response.
696+
The following example shows a SQL input binding in a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query, which is filtered by a parameter from the query string, and it returns the row in the HTTP response.
697697

698698
The following is binding data in the function.json file:
699699

@@ -744,7 +744,7 @@ Push-OutputBinding -Name res -Value ([HttpResponseContext]@{
744744
<a id="http-trigger-delete-one-or-multiple-rows-powershell"></a>
745745
### HTTP trigger, delete rows
746746

747-
The following example shows a SQL input binding in a function.json file and a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
747+
The following example shows a SQL input binding in a function.json file and a PowerShell function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It executes a stored procedure with input from the HTTP request query parameter.
748748

749749
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
750750

@@ -814,7 +814,7 @@ The examples refer to a database table:
814814
<a id="http-trigger-get-multiple-items-python"></a>
815815
### HTTP trigger, get multiple rows
816816

817-
The following example shows a SQL input binding in a function.json file and a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query and returns the results in the HTTP response.
817+
The following example shows a SQL input binding in a function.json file and a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query and returns the results in the HTTP response.
818818

819819
# [v2](#tab/python-v2)
820820

@@ -896,7 +896,7 @@ def main(req: func.HttpRequest, todoItems: func.SqlRowList) -> func.HttpResponse
896896
<a id="http-trigger-look-up-id-from-query-string-python"></a>
897897
### HTTP trigger, get row by ID from query string
898898

899-
The following example shows a SQL input binding in a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and reads from a query filtered by a parameter from the query string and returns the row in the HTTP response.
899+
The following example shows a SQL input binding in a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request. It reads from a query, which is filtered by a parameter from the query string, and it returns the row in the HTTP response.
900900

901901
# [v2](#tab/python-v2)
902902

@@ -981,7 +981,7 @@ def main(req: func.HttpRequest, todoItem: func.SqlRowList) -> func.HttpResponse:
981981
<a id="http-trigger-delete-one-or-multiple-rows-python"></a>
982982
### HTTP trigger, delete rows
983983

984-
The following example shows a SQL input binding in a function.json file and a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) request and executes a stored procedure with input from the HTTP request query parameter.
984+
The following example shows a SQL input binding in a function.json file and a Python function that is [triggered by an HTTP](./functions-bindings-http-webhook-trigger.md) reques. It executes a stored procedure with input from the HTTP request query parameter.
985985

986986
The stored procedure `dbo.DeleteToDo` must be created on the database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
987987

articles/azure-functions/functions-bindings-azure-sql-output.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The examples refer to a `ToDoItem` class and a corresponding database table:
4444

4545
:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7":::
4646

47-
To return [multiple output bindings](./dotnet-isolated-process-guide.md#multiple-output-bindings) in our samples, we'll create a custom return type:
47+
To return [multiple output bindings](./dotnet-isolated-process-guide.md#multiple-output-bindings) in our samples, we create a custom return type:
4848

4949
```cs
5050
public static class OutputType
@@ -133,7 +133,7 @@ CREATE TABLE dbo.RequestLog (
133133
)
134134
```
135135

136-
To use an additional output binding, we add a class for `RequestLog` and modify our `OutputType` class:
136+
To use an extra output binding, we add a class for `RequestLog` and modify our `OutputType` class:
137137

138138
```cs
139139
using System;
@@ -378,7 +378,7 @@ public class ToDoItem {
378378
<a id="http-trigger-write-record-to-table-java"></a>
379379
### HTTP trigger, write a record to a table
380380

381-
The following example shows a SQL output binding in a Java function that adds a record to a table, using data provided in an HTTP POST request as a JSON body. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
381+
The following example shows a SQL output binding in a Java function that adds a record to a table, using data provided in an HTTP POST request as a JSON body. The function takes another dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
382382

383383
```xml
384384
<dependency>
@@ -423,7 +423,7 @@ public class PostToDo {
423423
<a id="http-trigger-write-to-two-tables-java"></a>
424424
### HTTP trigger, write to two tables
425425

426-
The following example shows a SQL output binding in a JavaS function that adds records to a database in two different tables (`dbo.ToDo` and `dbo.RequestLog`), using data provided in an HTTP POST request as a JSON body and multiple output bindings. The function takes an additional dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
426+
The following example shows a SQL output binding in a JavaS function that adds records to a database in two different tables (`dbo.ToDo` and `dbo.RequestLog`), using data provided in an HTTP POST request as a JSON body and multiple output bindings. The function takes another dependency on the [com.google.code.gson](https://github.com/google/gson) library to parse the JSON body.
427427

428428
```xml
429429
<dependency>
@@ -1098,7 +1098,7 @@ The [C# library](functions-dotnet-class-library.md) uses the [SqlAttribute](http
10981098
| Attribute property |Description|
10991099
|---------|---------|
11001100
| **CommandText** | Required. The name of the table being written to by the binding. |
1101-
| **ConnectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable. |
1101+
| **ConnectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This value isn't the actual connection string and must instead resolve to an environment variable. |
11021102

11031103

11041104
::: zone-end
@@ -1111,7 +1111,7 @@ In the [Java functions runtime library](/java/api/overview/azure/functions/runti
11111111
| Element |Description|
11121112
|---------|---------|
11131113
| **commandText** | Required. The name of the table being written to by the binding. |
1114-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable.|
1114+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This value isn't the actual connection string and must instead resolve to an environment variable.|
11151115
|**name** | Required. The unique name of the function binding. |
11161116

11171117
::: zone-end
@@ -1126,7 +1126,7 @@ The following table explains the properties that you can set on the `options` ob
11261126
| Property | Description |
11271127
|---------|----------------------|
11281128
| **commandText** | Required. The name of the table being written to by the binding. |
1129-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1129+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This value isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11301130

11311131
# [Model v3](#tab/nodejs-v3)
11321132

@@ -1138,7 +1138,7 @@ The following table explains the binding configuration properties that you set i
11381138
|**direction** | Required. Must be set to `out`. |
11391139
|**name** | Required. The name of the variable that represents the entity in function code. |
11401140
| **commandText** | Required. The name of the table being written to by the binding. |
1141-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1141+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This value isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11421142

11431143
---
11441144

@@ -1154,7 +1154,7 @@ The following table explains the binding configuration properties that you set i
11541154
|**direction** | Required. Must be set to `out`. |
11551155
|**name** | Required. The name of the variable that represents the entity in function code. |
11561156
| **commandText** | Required. The name of the table being written to by the binding. |
1157-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
1157+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This value isn't the actual connection string and must instead resolve to an environment variable. Optional keywords in the connection string value are [available to refine SQL bindings connectivity](./functions-bindings-azure-sql.md#sql-connection-string). |
11581158

11591159
::: zone-end
11601160

@@ -1168,7 +1168,7 @@ The `CommandText` property is the name of the table where the data is to be stor
11681168

11691169
The output bindings use the T-SQL [MERGE](/sql/t-sql/statements/merge-transact-sql) statement which requires [SELECT](/sql/t-sql/statements/merge-transact-sql#permissions) permissions on the target database.
11701170

1171-
If an exception occurs when a SQL output binding is executed then the function code stop executing. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code. If the `IAsyncCollector` is used in a .NET function then the function code can handle exceptions throw by the call to `FlushAsync()`.
1171+
If an exception occurs when a SQL output binding is executed, then the function code stops executing. This behavior may result in an error code being returned, such as an HTTP trigger returning a 500 error code. If the `IAsyncCollector` is used in a .NET function, then the function code can handle exceptions throw by the call to `FlushAsync()`.
11721172

11731173
## Next steps
11741174

0 commit comments

Comments
 (0)