Skip to content

Commit a2842f9

Browse files
committed
Removing the commented lines for Azure Function for MySQL
1 parent 69e6513 commit a2842f9

File tree

4 files changed

+4
-782
lines changed

4 files changed

+4
-782
lines changed

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

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ For information on setup and configuration details, see the [overview](./functio
2727

2828
[!INCLUDE [functions-bindings-csharp-intro-with-csx](../../includes/functions-bindings-csharp-intro-with-csx.md)]
2929

30-
<!-- >[!INCLUDE [functions-in-process-model-retirement-note](../../includes/functions-in-process-model-retirement-note.md)] -->
3130

3231
# [Isolated worker model](#tab/isolated-process)
3332

@@ -41,7 +40,6 @@ This section contains the following examples:
4140

4241
The examples refer to a `Product` class and a corresponding database table:
4342

44-
<!-- >:::code language="csharp" source="~/functions-sql-todo-sample/ToDoModel.cs" range="6-16"::: -->
4543
```csharp
4644
namespace Microsoft.Azure.WebJobs.Extensions.MySql.Samples.Common
4745
{
@@ -58,7 +56,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.MySql.Samples.Common
5856
}
5957
```
6058

61-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
6259
```sql
6360
DROP TABLE IF EXISTS Products;
6461

@@ -143,7 +140,6 @@ The following example shows a [C# function](functions-dotnet-class-library.md) t
143140

144141
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.
145142

146-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
147143
```sql
148144
DROP PROCEDURE IF EXISTS DeleteProductsCost;
149145

@@ -186,7 +182,6 @@ This section contains the following examples:
186182

187183
The examples refer to a `Product` class and a corresponding database table:
188184

189-
<!-- >:::code language="csharp" source="~/functions-sql-todo-sample/ToDoModel.cs" range="6-16"::: -->
190185
```csharp
191186
namespace Microsoft.Azure.WebJobs.Extensions.MySql.Samples.Common
192187
{
@@ -203,7 +198,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.MySql.Samples.Common
203198
}
204199
```
205200

206-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
207201
```sql
208202
DROP TABLE IF EXISTS Products;
209203

@@ -287,7 +281,6 @@ The following example shows a [C# function](functions-dotnet-class-library.md) t
287281

288282
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.
289283

290-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
291284
```sql
292285
DROP PROCEDURE IF EXISTS DeleteProductsCost;
293286

@@ -297,7 +290,6 @@ BEGIN
297290
END
298291
```
299292

300-
<!-- >:::code language="csharp" source="~/functions-sql-todo-sample/DeleteToDo.cs" range="4-30"::: -->
301293
```cs
302294
namespace Microsoft.Azure.WebJobs.Extensions.MySql.Samples.InputBindingSamples
303295
{
@@ -353,7 +345,6 @@ public class Product {
353345
}
354346
```
355347

356-
<!-- > :::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
357348
```sql
358349
DROP TABLE IF EXISTS Products;
359350

@@ -441,7 +432,6 @@ The following example shows a MySQL input binding in a Java function that is [tr
441432

442433
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.
443434

444-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
445435
```sql
446436
DROP PROCEDURE IF EXISTS DeleteProductsCost;
447437

@@ -488,7 +478,6 @@ This section contains the following examples:
488478

489479
The examples refer to a database table:
490480

491-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
492481
```sql
493482
DROP TABLE IF EXISTS Products;
494483

@@ -509,7 +498,6 @@ The following example shows a MYSQL input binding that is [triggered by an HTTP]
509498

510499
# [Model v4](#tab/nodejs-v4)
511500

512-
<!-- >:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/sqlInput1.ts" ::: -->
513501
```typescript
514502
import { app, HttpRequest, HttpResponseInit, input, InvocationContext } from '@azure/functions';
515503

@@ -547,7 +535,6 @@ TypeScript samples aren't documented for model v3.
547535

548536
# [Model v4](#tab/nodejs-v4)
549537

550-
<!-- >:::code language="javascript" source="~/azure-functions-nodejs-v4/js/src/functions/sqlInput1.js" ::: -->
551538
```javascript
552539
const { app, input } = require('@azure/functions');
553540

@@ -641,7 +628,6 @@ The following example shows a MySQL input binding that is [triggered by an HTTP]
641628

642629
# [Model v4](#tab/nodejs-v4)
643630

644-
<!-- >:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/sqlInput2.ts" ::: -->
645631
```typescript
646632
import { app, HttpRequest, HttpResponseInit, input, InvocationContext } from '@azure/functions';
647633

@@ -679,7 +665,6 @@ TypeScript samples aren't documented for model v3.
679665

680666
# [Model v4](#tab/nodejs-v4)
681667

682-
<!-- >:::code language="javascript" source="~/azure-functions-nodejs-v4/js/src/functions/sqlInput2.js" ::: -->
683668
```javascript
684669
const { app, input } = require('@azure/functions');
685670

@@ -770,7 +755,6 @@ The following example shows a MySQL input binding that is [triggered by an HTTP]
770755

771756
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.
772757

773-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
774758
```sql
775759
DROP PROCEDURE IF EXISTS DeleteProductsCost;
776760

@@ -785,7 +769,6 @@ END
785769

786770
# [Model v4](#tab/nodejs-v4)
787771

788-
<!-- >:::code language="typescript" source="~/azure-functions-nodejs-v4/ts/src/functions/sqlInput3.ts" ::: -->
789772
```typescript
790773
import { app, HttpRequest, HttpResponseInit, input, InvocationContext } from '@azure/functions';
791774

@@ -823,7 +806,6 @@ TypeScript samples aren't documented for model v3.
823806

824807
# [Model v4](#tab/nodejs-v4)
825808

826-
<!-- >:::code language="javascript" source="~/azure-functions-nodejs-v4/js/src/functions/sqlInput3.js" ::: -->
827809
```javascript
828810
const { app, input } = require('@azure/functions');
829811

@@ -916,7 +898,6 @@ This section contains the following examples:
916898

917899
The examples refer to a database table:
918900

919-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
920901
```sql
921902
DROP TABLE IF EXISTS Products;
922903

@@ -1046,7 +1027,6 @@ The following example shows a MySQL input binding in a function.json file and a
10461027

10471028
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.
10481029

1049-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
10501030
```sql
10511031
DROP PROCEDURE IF EXISTS DeleteProductsCost;
10521032

@@ -1120,7 +1100,6 @@ This section contains the following examples:
11201100

11211101
The examples refer to a database table:
11221102

1123-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="1-7"::: -->
11241103
```sql
11251104
DROP TABLE IF EXISTS Products;
11261105

@@ -1320,7 +1299,6 @@ The following example shows a MySQL input binding in a function.json file and a
13201299

13211300
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.
13221301

1323-
<!-- >:::code language="sql" source="~/functions-sql-todo-sample/sql/create.sql" range="11-25"::: -->
13241302
```sql
13251303
DROP PROCEDURE IF EXISTS DeleteProductsCost;
13261304

@@ -1505,12 +1483,11 @@ The following table explains the binding configuration properties that you set i
15051483

15061484
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/refman/8.4/en/connecting-using-uri-or-key-value-pairs.html#connecting-using-uri) to the Azure Database for MySQL.
15071485

1508-
<!-- >Queries executed by the input binding are [parameterized](/dotnet/api/microsoft.data.sqlclient.sqlparameter) in Microsoft.Data.SqlClient to reduce the risk of [SQL injection](/sql/relational-databases/security/sql-injection) from the parameter values passed into the binding. -->
15091486

15101487
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.
15111488

15121489
## Next steps
15131490

1514-
- [Save data to a database (Output binding)](./functions-bindings-azure-sql-output.md)
1515-
- [Run a function when data is changed in a SQL table (Trigger)](./functions-bindings-azure-sql-trigger.md)
1491+
- [Save data to a database (Output binding)](./functions-bindings-azure-mysql-output.md)
1492+
- [Run a function when data is changed in a MySQL table (Trigger)](./functions-bindings-azure-mysql-trigger.md)
15161493
- [Run a function from a HTTP request (trigger)](./functions-bindings-http-webhook-trigger.md)

0 commit comments

Comments
 (0)