Skip to content

Commit 20c0a93

Browse files
committed
Preview files for MySQL Azure Functions
1 parent b1d6146 commit 20c0a93

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace AzureMySqlSamples.InputBindingIsolatedSamples
141141

142142
The following example shows a [C# function](functions-dotnet-class-library.md) that executes a stored procedure with input from the HTTP request query parameter.
143143

144-
The stored procedure `DeleteProductsCost` must be created on the MySQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
144+
The stored procedure `DeleteProductsCost` must be created on the MySQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
145145

146146
```sql
147147
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -283,7 +283,7 @@ namespace AzureMySqlSamples.InputBindingSamples
283283

284284
The following example shows a [C# function](functions-dotnet-class-library.md) that executes a stored procedure with input from the HTTP request query parameter.
285285

286-
The stored procedure `DeleteProductsCost` must be created on the MySQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
286+
The stored procedure `DeleteProductsCost` must be created on the MySQL database. In this example, the stored procedure deletes a single record or all records depending on the value of the parameter.
287287

288288
```sql
289289
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -434,7 +434,7 @@ public class GetProductById {
434434

435435
The following example shows a MySQL 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.
436436

437-
The stored procedure `DeleteProductsCost` 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.
437+
The stored procedure `DeleteProductsCost` 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.
438438

439439
```sql
440440
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -570,7 +570,7 @@ app.http('GetProducts', {
570570

571571
# [Model v3](#tab/nodejs-v3)
572572

573-
The following is binding data in the function.json file:
573+
The following example is binding data in the function.json file:
574574

575575
```json
576576
{
@@ -605,7 +605,7 @@ The following is binding data in the function.json file:
605605

606606
The [configuration](#configuration) section explains these properties.
607607

608-
The following is sample JavaScript code:
608+
The following example is sample JavaScript code:
609609

610610
```javascript
611611
module.exports = async function (context, req, products) {
@@ -702,7 +702,7 @@ app.http('GetProducts', {
702702

703703
# [Model v3](#tab/nodejs-v3)
704704

705-
The following is binding data in the function.json file:
705+
The following example is binding data in the function.json file:
706706

707707
```json
708708
{
@@ -738,7 +738,7 @@ The following is binding data in the function.json file:
738738

739739
The [configuration](#configuration) section explains these properties.
740740

741-
The following is sample JavaScript code:
741+
The following example is sample JavaScript code:
742742

743743
```javascript
744744
module.exports = async function (context, req, products) {
@@ -762,7 +762,7 @@ module.exports = async function (context, req, products) {
762762

763763
The following example shows a MySQL 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.
764764

765-
The stored procedure `DeleteProductsCost` 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.
765+
The stored procedure `DeleteProductsCost` 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.
766766

767767
```sql
768768
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -880,7 +880,7 @@ app.http('httpTrigger1', {
880880

881881
The [configuration](#configuration) section explains these properties.
882882

883-
The following is sample JavaScript code:
883+
The following example is sample JavaScript code:
884884

885885

886886
```javascript
@@ -925,7 +925,7 @@ CREATE TABLE Products (
925925

926926
The following example shows a MySQL 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.
927927

928-
The following is binding data in the function.json file:
928+
The following example is binding data in the function.json file:
929929

930930
```json
931931
{
@@ -960,7 +960,7 @@ The following is binding data in the function.json file:
960960

961961
The [configuration](#configuration) section explains these properties.
962962

963-
The following is sample PowerShell code for the function in the `run.ps1` file:
963+
The following example is sample PowerShell code for the function in the `run.ps1` file:
964964

965965
```powershell
966966
using namespace System.Net
@@ -980,7 +980,7 @@ Push-OutputBinding -Name response -Value ([HttpResponseContext]@{
980980

981981
The following example shows a MySQL 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.
982982

983-
The following is binding data in the function.json file:
983+
The following example is binding data in the function.json file:
984984

985985
```json
986986
{
@@ -1037,7 +1037,7 @@ Push-OutputBinding -Name response -Value ([HttpResponseContext]@{
10371037

10381038
The following example shows a MySQL 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.
10391039

1040-
The stored procedure `DeleteProductsCost` 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.
1040+
The stored procedure `DeleteProductsCost` 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.
10411041

10421042
```sql
10431043
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -1082,7 +1082,7 @@ END
10821082

10831083
The [configuration](#configuration) section explains these properties.
10841084

1085-
The following is sample PowerShell code for the function in the `run.ps1` file:
1085+
The following example is sample PowerShell code for the function in the `run.ps1` file:
10861086

10871087

10881088
```powershell
@@ -1133,7 +1133,7 @@ The following example shows a MySQL input binding in a function.json file and a
11331133

11341134
# [v2](#tab/python-v2)
11351135

1136-
The following is sample python code for the function_app.py file:
1136+
The following example is sample python code for the function_app.py file:
11371137

11381138
```python
11391139
import azure.functions as func
@@ -1162,7 +1162,7 @@ def mysql_test(req: func.HttpRequest, products: func.MySqlRowList) -> func.HttpR
11621162

11631163
# [v1](#tab/python-v1)
11641164

1165-
The following is binding data in the function.json file:
1165+
The following example is binding data in the function.json file:
11661166

11671167
```json
11681168
{
@@ -1223,7 +1223,7 @@ The following example shows a MySQL input binding in a Python function that is [
12231223

12241224
# [v2](#tab/python-v2)
12251225

1226-
The following is sample python code for the function_app.py file:
1226+
The following example is sample python code for the function_app.py file:
12271227

12281228
```python
12291229
import azure.functions as func
@@ -1289,7 +1289,7 @@ The following is binding data in the function.json file:
12891289

12901290
The [configuration](#configuration) section explains these properties.
12911291

1292-
The following is sample Python code:
1292+
The following example is sample Python code:
12931293

12941294

12951295
```python
@@ -1313,7 +1313,7 @@ def main(req: func.HttpRequest, products: func.MySqlRowList) -> func.HttpRespons
13131313

13141314
The following example shows a MySQL 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.
13151315

1316-
The stored procedure `DeleteProductsCost` 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.
1316+
The stored procedure `DeleteProductsCost` 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.
13171317

13181318
```sql
13191319
DROP PROCEDURE IF EXISTS DeleteProductsCost;
@@ -1326,7 +1326,7 @@ END
13261326

13271327
# [v2](#tab/python-v2)
13281328

1329-
The following is sample python code for the function_app.py file:
1329+
The following example is sample python code for the function_app.py file:
13301330

13311331
```python
13321332
import azure.functions as func
@@ -1470,7 +1470,7 @@ The following table explains the binding configuration properties that you set i
14701470
|**direction** | Required. Must be set to `in`. |
14711471
|**name** | Required. The name of the variable that represents the query results in function code. |
14721472
| **commandText** | Required. The MySQL query command or name of the stored procedure executed by the binding. |
1473-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine MySQL bindings connectivity](./functions-bindings-azure-mysql.md#mysql-connection-string). |
1473+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine MySQL bindings connectivity](./functions-bindings-azure-mysql.md#mysql-connection-string). |
14741474
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is [Text](/dotnet/api/system.data.commandtype#fields) for a query and [StoredProcedure](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
14751475
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
14761476

@@ -1489,7 +1489,7 @@ The following table explains the binding configuration properties that you set i
14891489
|**direction** | Required. Must be set to `in`. |
14901490
|**name** | Required. The name of the variable that represents the query results in function code. |
14911491
| **commandText** | Required. The MySQL query command or name of the stored procedure executed by the binding. |
1492-
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine MySQL bindings connectivity](./functions-bindings-azure-mysql.md#mysql-connection-string). |
1492+
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. Optional keywords in the connection string value are [available to refine MySQL bindings connectivity](./functions-bindings-azure-mysql.md#mysql-connection-string). |
14931493
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is [Text](/dotnet/api/system.data.commandtype#fields) for a query and [StoredProcedure](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
14941494
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
14951495

@@ -1503,7 +1503,7 @@ The following table explains the binding configuration properties that you set i
15031503
The attribute's constructor takes the MySQL command text, the command type, parameters, and the connection string setting name. The command can be a MYSQL query with the command type `System.Data.CommandType.Text` or stored procedure name with the command type `System.Data.CommandType.StoredProcedure`. The connection string setting name corresponds to the application setting (in `local.settings.json` for local development) that contains the [connection string](https://dev.mysql.com/doc/connector-net/en/connector-net-connections-string.html) to the Azure Database for MySQL.
15041504

15051505

1506-
If an exception occurs when a MySQL input binding is executed then the function code won't execute. This may result in an error code being returned, such as an HTTP trigger returning a 500 error code.
1506+
If an exception occurs when a MySQL input binding is executed then the function code won't execute. This might result in an error code being returned, such as an HTTP trigger returning a 500 error code.
15071507

15081508
## Next steps
15091509

0 commit comments

Comments
 (0)