Skip to content

Commit b752970

Browse files
committed
improve samples
1 parent e29a8b2 commit b752970

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

articles/azure-functions/functions-bindings-azure-sql-input.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public class GetToDoItems {
196196
authLevel = AuthorizationLevel.ANONYMOUS)
197197
HttpRequestMessage<Optional<String>> request,
198198
@SQLInput(
199-
name = "sqlInput1",
199+
name = "toDoItems",
200200
commandText = "SELECT * FROM dbo.ToDo",
201201
commandType = "Text",
202202
connectionStringSetting = "SqlConnectionString")
@@ -221,7 +221,7 @@ public class GetToDoItem {
221221
authLevel = AuthorizationLevel.ANONYMOUS)
222222
HttpRequestMessage<Optional<String>> request,
223223
@SQLInput(
224-
name = "sqlInput2",
224+
name = "toDoItems",
225225
commandText = "SELECT * FROM dbo.ToDo",
226226
commandType = "Text",
227227
parameters = "@Id={Query.id}",
@@ -253,7 +253,7 @@ public class DeleteToDo {
253253
authLevel = AuthorizationLevel.ANONYMOUS)
254254
HttpRequestMessage<Optional<String>> request,
255255
@SQLInput(
256-
name = "sqlInput3",
256+
name = "toDoItems",
257257
commandText = "dbo.DeleteToDo",
258258
commandType = "StoredProcedure",
259259
parameters = "@Id={Query.id}",
@@ -806,6 +806,7 @@ In the [Java functions runtime library](/java/api/overview/azure/functions/runti
806806
| **commandText** | Required. The Transact-SQL query command or name of the stored procedure executed by the binding. |
807807
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed. This value isn't the actual connection string and must instead resolve to an environment variable name. |
808808
| **commandType** | Required. A [CommandType](/dotnet/api/system.data.commandtype) value, which is ["Text"](/dotnet/api/system.data.commandtype#fields) for a query and ["StoredProcedure"](/dotnet/api/system.data.commandtype#fields) for a stored procedure. |
809+
|**name** | Required. The unique name of the function binding. |
809810
| **parameters** | Optional. Zero or more parameter values passed to the command during execution as a single string. Must follow the format `@param1=param1,@param2=param2`. Neither the parameter name nor the parameter value can contain a comma (`,`) or an equals sign (`=`). |
810811

811812
::: zone-end

articles/azure-functions/functions-bindings-azure-sql-output.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public class PostToDo {
233233
public HttpResponseMessage run(
234234
@HttpTrigger(name = "req", methods = {HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
235235
@SQLOutput(
236-
name = "sqlOutput",
236+
name = "toDoItem",
237237
commandText = "dbo.ToDo",
238238
connectionStringSetting = "SqlConnectionString")
239239
OutputBinding<ToDoItem> output) throws JsonParseException, JsonMappingException, JsonProcessingException {
@@ -315,12 +315,12 @@ public class PostToDoWithLog {
315315
public HttpResponseMessage run(
316316
@HttpTrigger(name = "req", methods = {HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
317317
@SQLOutput(
318-
name = "sqlOutput",
318+
name = "toDoItem",
319319
commandText = "dbo.ToDo",
320320
connectionStringSetting = "SqlConnectionString")
321321
OutputBinding<ToDoItem> output,
322322
@SQLOutput(
323-
name = "sqlOutput2",
323+
name = "requestLog",
324324
commandText = "dbo.RequestLog",
325325
connectionStringSetting = "SqlConnectionString")
326326
OutputBinding<RequestLog> outputLog,
@@ -836,6 +836,7 @@ In the [Java functions runtime library](/java/api/overview/azure/functions/runti
836836
|---------|---------|
837837
| **commandText** | Required. The name of the table being written to by the binding. |
838838
| **connectionStringSetting** | Required. The name of an app setting that contains the connection string for the database to which data is being written. This isn't the actual connection string and must instead resolve to an environment variable.|
839+
|**name** | Required. The unique name of the function binding. |
839840

840841
::: zone-end
841842

0 commit comments

Comments
 (0)