Annotation Type TableInput
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface TableInputPlace this on a parameter whose value would come from storage table. The parameter type can be one of the following:
- Any native Java types such as int, String, byte[]
- Nullable values using Optional<T>
- Any POJO type
The following example shows an HTTP trigger which returned the total count of the items in a table storage:
@FunctionName("getallcount") public int run( @HttpTrigger(name = "req", methods = {"get"}, authLevel = AuthorizationLevel.ANONYMOUS) Object dummyShouldNotBeUsed, @TableInput(name = "items", tableName = "mytablename", partitionKey = "myparkey", connection = "myconnvarname") MyItem[] items ) { return items.length; }- Since:
- 1.0.0
- See Also:
HttpTrigger
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringconnectionDefines the app setting name that contains the Azure Storage connection string.java.lang.StringdataTypeDefines how Functions runtime should treat the parameter value.java.lang.StringfilterDefines the filter of the storage table to which to bind.java.lang.StringpartitionKeyDefines the partition key of the storage table to which to bind.java.lang.StringrowKeyDefines the row key of the storage table to which to bind.java.lang.StringtakeDefines the number of rows to be retrieved from the storage table to which to bind.
-
-
-
-
dataType
java.lang.String dataType
Defines how Functions runtime should treat the parameter value. Possible values are:
- "": get the value as a string, and try to deserialize to actual parameter type like POJO
- string: always get the value as a string
- binary: get the value as a binary data, and try to deserialize to actual parameter type byte[]
- Returns:
- The dataType which will be used by the Functions runtime.
- Default:
- ""
-
-