TableInput Interface
Implements
public interface TableInput implements java.lang.annotation.Annotation
Place 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
- 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;
}
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
connection()
Defines the app setting name that contains the Azure Storage connection string. |
abstract java.lang.String |
dataType()
Defines how Functions runtime should treat the parameter value. |
abstract java.lang.String |
filter()
Defines the filter of the storage table to which to bind. |
abstract java.lang.String |
name()
The variable name used in function. |
abstract java.lang.String |
partitionKey()
Defines the partition key of the storage table to which to bind. |
abstract java.lang.String |
rowKey()
Defines the row key of the storage table to which to bind. |
abstract java.lang.String |
tableName()
Defines the name of the storage table to which to bind. |
abstract java.lang.String |
take()
Defines the number of rows to be retrieved from the storage table to which to bind. |
Method Details
connection
public abstract String connection()
Defines the app setting name that contains the Azure Storage connection string.
Returns:
dataType
public abstract 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:
filter
public abstract String filter()
Defines the filter of the storage table to which to bind.
Returns:
name
public abstract String name()
The variable name used in function.json.
Returns:
partitionKey
public abstract String partitionKey()
Defines the partition key of the storage table to which to bind.
Returns:
rowKey
public abstract String rowKey()
Defines the row key of the storage table to which to bind.
Returns:
tableName
public abstract String tableName()
Defines the name of the storage table to which to bind.
Returns:
take
public abstract String take()
Defines the number of rows to be retrieved from the storage table to which to bind.
Returns:
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour