You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
612
612
613
613
| Element |Description|
614
614
|---------|---------|
@@ -633,6 +633,7 @@ The following table explains the binding configuration properties that you set i
633
633
|**tableName**| Required. The name of the table monitored by the trigger. |
634
634
|**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.|
635
635
| **LeasesTableName** | Optional. Name of the table used to store leases. If not specified, the leases table name will be Leases_{FunctionId}_{TableId}.
636
+
636
637
::: zone-end
637
638
638
639
## Optional Configuration
@@ -716,10 +717,13 @@ Azure Database for MySQL Trigger ndings use "az_func_updated_at" and column's da
716
717
717
718
The change tracking can be enabled on a table through following query. For example, enable on ‘Products’ table:
718
719
719
-
```sql
720
-
ALTER TABLE Products;
721
-
ADD az_func_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
722
-
```
720
+
```sql
721
+
ALTERTABLE Products;
722
+
ADD az_func_updated_at
723
+
TIMESTAMP DEFAULT CURRENT_TIMESTAMP
724
+
ONUPDATECURRENT_TIMESTAMP;
725
+
```
726
+
723
727
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.
0 commit comments