Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java-library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.microsoft.azure.functions</groupId>
<artifactId>azure-functions-java-library-sql</artifactId>
<version>0.1.1</version> <!-- Update the dependency version in samples-java/pom.xml and test-java/pom.xml if this version is updated. -->
<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. -->
<packaging>jar</packaging>

<parent>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.functions.sql.annotation;

/**
* The type of commandText.
*/
public enum CommandType {
/**
* The commandText is a SQL query.
*/
Text,

/**
* The commandText is a SQL stored procedure.
*/
StoredProcedure
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
/**
* Query string or name of stored procedure to be run.
*/
String commandText() default "";
String commandText();

/**
* Text or Stored Procedure.
*/
String commandType() default "";
CommandType commandType();

/**
* Parameters to the query or stored procedure. This string must follow the format
Expand All @@ -42,5 +42,5 @@
/**
* Setting name for SQL connection string.
*/
String connectionStringSetting() default "";
String connectionStringSetting();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
/**
* Name of the table to upsert data to.
*/
String commandText() default "";
String commandText();

/**
* Setting name for SQL connection string.
*/
String connectionStringSetting() default "";
String connectionStringSetting();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

package com.microsoft.azure.functions.sql.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;

import com.microsoft.azure.functions.annotation.CustomBinding;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@CustomBinding(direction = "in", name = "", type = "sqlTrigger")
public @interface SQLTrigger {
/**
* The variable name used in function.json.
*/
String name();

/**
* Name of the table to watch for changes.
*/
String tableName();

/**
* Setting name for SQL connection string.
*/
String connectionStringSetting();
}