Skip to content

Commit 2667f12

Browse files
committed
edit pass: azure-database-for-mysql-bindings
1 parent 71432e8 commit 2667f12

File tree

4 files changed

+145
-166
lines changed

4 files changed

+145
-166
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ CREATE TABLE Products (
6969

7070
### HTTP trigger, write one record
7171

72-
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, by using data provided in an HTTP `POST` request as a JSON body:
72+
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, by using data provided in an HTTP `POST` request as a JSON body.
7373

7474
```cs
7575
using Microsoft.AspNetCore.Mvc;
@@ -135,7 +135,7 @@ CREATE TABLE Products (
135135

136136
### HTTP trigger, write one record
137137

138-
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, by using data provided in an HTTP `POST` request as a JSON body:
138+
The following example shows a [C# function](functions-dotnet-class-library.md) that adds a record to a database, by using data provided in an HTTP `POST` request as a JSON body.
139139

140140
```csharp
141141
using Microsoft.AspNetCore.Mvc;
@@ -292,7 +292,7 @@ CREATE TABLE Products (
292292
<a id="http-trigger-write-records-to-table-javascript"></a>
293293
### HTTP trigger, write records to a table
294294

295-
The following example shows a MySQL output binding that adds records to a table, by using data provided in an HTTP `POST` request as a JSON body:
295+
The following example shows a MySQL output binding that adds records to a table, by using data provided in an HTTP `POST` request as a JSON body.
296296

297297
::: zone-end
298298

@@ -447,7 +447,9 @@ CREATE TABLE Products (
447447
<a id="http-trigger-write-records-to-table-powershell"></a>
448448
### HTTP trigger, write records to a table
449449

450-
The following example shows a MySQL output binding in a function.json file and a PowerShell function that adds records to a table, by using data provided in an HTTP `POST` request as a JSON body:
450+
The following example shows a MySQL output binding in a function.json file and a PowerShell function that adds records to a table, by using data provided in an HTTP `POST` request as a JSON body.
451+
452+
The following example is binding data in the function.json file:
451453

452454
```json
453455
{
@@ -641,7 +643,7 @@ The [C# library](functions-dotnet-class-library.md) uses the `MySqlAttribute` at
641643
| Attribute property |Description|
642644
|---------|---------|
643645
| `CommandText` | Required. The name of the table that the binding writes to. |
644-
| `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. |
646+
| `ConnectionStringSetting` | Required. The name of an app setting that contains the connection string for the database to which data is written. This value isn't the actual connection string and must instead resolve to an environment variable. |
645647

646648
::: zone-end
647649

@@ -654,7 +656,7 @@ In the [Java functions runtime library](/java/api/overview/azure/functions/runti
654656
| Element |Description|
655657
|---------|---------|
656658
| `commandText` | Required. The name of the table that the binding writes to. |
657-
| `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.|
659+
| `connectionStringSetting` | Required. The name of an app setting that contains the connection string for the database to which data is written. This isn't the actual connection string and must instead resolve to an environment variable.|
658660
| `name` | Required. The unique name of the function binding. |
659661

660662
::: zone-end
@@ -670,7 +672,7 @@ The following table explains the properties that you can set on the `options` ob
670672
| Property | Description |
671673
|---------|----------------------|
672674
| `commandText` | Required. The name of the table that the binding writes to. |
673-
| `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. |
675+
| `connectionStringSetting` | Required. The name of an app setting that contains the connection string for the database to which data is written. This isn't the actual connection string and must instead resolve to an environment variable. |
674676

675677
# [Model v3](#tab/nodejs-v3)
676678

@@ -682,7 +684,7 @@ The following table explains the binding configuration properties that you set i
682684
|`direction` | Required. Must be set to `out`. |
683685
|`name` | Required. The name of the variable that represents the entity in function code. |
684686
| `commandText` | Required. The name of the table that the binding writes to. |
685-
| `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. |
687+
| `connectionStringSetting` | Required. The name of an app setting that contains the connection string for the database to which data is written. This isn't the actual connection string and must instead resolve to an environment variable. |
686688

687689
---
688690

@@ -700,7 +702,7 @@ The following table explains the binding configuration properties that you set i
700702
|`direction` | Required. Must be set to `out`. |
701703
|`name` | Required. The name of the variable that represents the entity in function code. |
702704
| `commandText` | Required. The name of the table that the binding writes to. |
703-
| `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. |
705+
| `connectionStringSetting` | Required. The name of an app setting that contains the connection string for the database to which data is written. This isn't the actual connection string and must instead resolve to an environment variable. |
704706

705707
::: zone-end
706708

@@ -709,13 +711,13 @@ The following table explains the binding configuration properties that you set i
709711
> [!NOTE]
710712
> The output binding supports all special characters, including dollar sign ($), backtick (`), hyphen (-), and underscore (_) . For more information, see the [MySQL community documentation](https://dev.mysql.com/doc/refman/8.0/en/identifiers.html).
711713
>
712-
> A programming language might define member attributes that contain special characters that it supports. For example, C# has few limitations for defining [variables](/dotnet/csharp/fundamentals/coding-style/identifier-names).
714+
> A programming language might define member attributes that contain special characters that it supports. For example, C# has a few limitations for defining [variables](/dotnet/csharp/fundamentals/coding-style/identifier-names).
713715
>
714716
> Otherwise, you can use `JObject` for the output binding that covers all special characters. You can follow a [detailed example on GitHub](https://github.com/Azure/azure-functions-mysql-extension/blob/main/samples/samples-csharp/OutputBindingSamples/AddProductJObject.cs).
715717
716718
## Usage
717719

718-
The `CommandText` property is the name of the table where the data will be stored. The name of the connection string setting corresponds to the application setting that contains the connection string to Azure Database for MySQL.
720+
The `CommandText` property is the name of the table where the data is stored. The name of the connection string setting corresponds to the application setting that contains the connection string to Azure Database for MySQL.
719721

720722
If an exception occurs when a MySQL input binding is executed, the function code won't run. The result might be an error code, such as an HTTP trigger that returns a 500 error code.
721723

0 commit comments

Comments
 (0)