Skip to content

Commit 824e046

Browse files
authored
Add leasesTableName to SqlTrigger Java annotation (#897)
* add leasestablename to java sqltrigger * add default value for commandtype * remove sample
1 parent 04f64be commit 824e046

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

java-library/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.microsoft.azure.functions</groupId>
66
<artifactId>azure-functions-java-library-sql</artifactId>
7-
<version>2.0.0-preview</version> <!-- Update the dependency version in samples-java/pom.xml and test-java/pom.xml if this version is updated. -->
7+
<version>2.1.0-preview</version> <!-- Update the dependency version in samples-java/pom.xml and test-java/pom.xml if this version is updated. -->
88
<packaging>jar</packaging>
99

1010
<parent>

java-library/src/main/java/com/microsoft/azure/functions/sql/annotation/SQLInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/**
3131
* Text or Stored Procedure.
3232
*/
33-
CommandType commandType();
33+
CommandType commandType() default CommandType.Text;
3434

3535
/**
3636
* Parameters to the query or stored procedure. This string must follow the format

java-library/src/main/java/com/microsoft/azure/functions/sql/annotation/SQLTrigger.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@
3131
* Setting name for SQL connection string.
3232
*/
3333
String connectionStringSetting();
34+
35+
/**
36+
* Optional. Name of the table used to store leases. If not specified, the leases table name will be
37+
* Leases_{FunctionId}_{TableId}. More information on how this is generated can be found here:
38+
* https://github.com/Azure/azure-functions-sql-extension/blob/release/trigger/docs/TriggerBinding.md#az_funcleases_).
39+
*/
40+
String leasesTableName() default "";
3441
}

0 commit comments

Comments
 (0)