Skip to content

Commit ac5d3dd

Browse files
committed
Minor Changes for Azure Function for MySQL
1 parent a2842f9 commit ac5d3dd

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ $changesJson = $changes | ConvertTo-Json -Compress
422422
Write-Host "MySql Changes: $changesJson"
423423
```
424424
::: zone-end
425+
426+
425427
::: zone pivot="programming-language-javascript"
426428
## Example usage
427429
<a id="example"></a>
@@ -488,8 +490,6 @@ module.exports = async function (context, changes) {
488490
::: zone-end
489491

490492

491-
492-
493493
::: zone pivot="programming-language-python"
494494
## Example usage
495495
<a id="example"></a>
@@ -608,7 +608,7 @@ def main(changes):
608608
::: zone pivot="programming-language-java"
609609
## Annotations
610610

611-
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `@MySQLTrigger` annotation (`com.microsoft.azure.functions.sql.annotation.SQLTrigger`) on parameters whose value would come from Azure Database for MySQL. This annotation supports the following elements:
611+
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `@MySQLTrigger` annotation on parameters whose value would come from Azure Database for MySQL. This annotation supports the following elements:
612612

613613
| Element |Description|
614614
|---------|---------|
@@ -633,6 +633,7 @@ The following table explains the binding configuration properties that you set i
633633
| **tableName** | Required. The name of the table monitored by the trigger. |
634634
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database containing the table monitored for changes. 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) to the Azure Database for MySQL.|
635635
| **LeasesTableName** | Optional. Name of the table used to store leases. If not specified, the leases table name will be Leases_{FunctionId}_{TableId}.
636+
636637
::: zone-end
637638

638639
## Optional Configuration
@@ -716,10 +717,13 @@ Azure Database for MySQL Trigger ndings use "az_func_updated_at" and column's da
716717

717718
The change tracking can be enabled on a table through following query. For example, enable on ‘Products’ table:
718719

719-
```sql
720-
ALTER TABLE Products;
721-
ADD az_func_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
722-
```
720+
```sql
721+
ALTER TABLE Products;
722+
ADD az_func_updated_at
723+
TIMESTAMP DEFAULT CURRENT_TIMESTAMP
724+
ON UPDATE CURRENT_TIMESTAMP;
725+
```
726+
723727
The leases table contains all columns corresponding to the primary key from the user table and two additional columns _az_func_AttemptCount and _az_func_LeaseExpirationTime. So, if any of the primary key columns happen to have the same name, that will result in an error message listing any conflicts. In this case, the listed primary key columns must be renamed for the trigger to work.
724728

725729

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ You can use the preview extension bundle by adding or replacing the following co
117117

118118
## Install bundle
119119

120-
The SQL bindings extension is part of the v4 [extension bundle], which is specified in your host.json project file.
120+
The MySQL bindings extension is part of the v4 [extension bundle], which is specified in your host.json project file.
121121

122122
# [Preview Bundle v4.x](#tab/extensionv4p)
123123

0 commit comments

Comments
 (0)