From 321746dfff2ce3383c083646b98033c70f9d9517 Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Thu, 9 Feb 2023 08:14:18 -0800 Subject: [PATCH 1/2] Update SetupGuide_Python.md --- docs/SetupGuide_Python.md | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/SetupGuide_Python.md b/docs/SetupGuide_Python.md index 602c8961c..78125eca8 100644 --- a/docs/SetupGuide_Python.md +++ b/docs/SetupGuide_Python.md @@ -13,12 +13,10 @@ - [Empty Parameter Value](#empty-parameter-value) - [Null Parameter Value](#null-parameter-value) - [Stored Procedure](#stored-procedure) - - [IAsyncEnumerable](#iasyncenumerable) - [Output Binding](#output-binding) - [function.json Properties for Output Bindings](#functionjson-properties-for-output-bindings) - [Setup for Output Bindings](#setup-for-output-bindings) - [Samples for Output Bindings](#samples-for-output-bindings) - - [ICollector\/IAsyncCollector\](#icollectortiasynccollectort) - [Array](#array) - [Single Row](#single-row) - [Trigger Binding](#trigger-binding) @@ -115,23 +113,27 @@ Note: This tutorial requires that a SQL database is setup as shown in [Create a #### Query String -_TODO_ +The input binding executes the `SELECT * FROM Products WHERE Cost = @Cost` query. The Parameters argument passes the `{cost}` specified in the URL that triggers the function, `getproducts/{cost}`, as the value of the `@Cost` parameter in the query. CommandType is set to `Text`, since the constructor argument of the binding is a raw query. + +https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProducts #### Empty Parameter Value -_TODO_ +In this case, the parameter value of the `@Name` parameter is an empty string. + +https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProductsNameEmpty #### Null Parameter Value +If the `{name}` specified in the `getproducts-namenull/{name}` URL is "null", the query returns all rows for which the Name column is `NULL`. Otherwise, it returns all rows for which the value of the Name column matches the string passed in `{name}` + _TODO_ #### Stored Procedure -_TODO_ +`SelectProductsCost` is the name of a procedure stored in the user's database. In this case, CommandType is `StoredProcedure`. The parameter value of the `@Cost` parameter in the procedure is once again the `{cost}` specified in the `getproducts-storedprocedure/{cost}` URL. -#### IAsyncEnumerable - -_TODO_ +https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProductsStoredProcedure ## Output Binding @@ -198,18 +200,14 @@ Note: This tutorial requires that a SQL database is setup as shown in [Create a ### Samples for Output Bindings -#### ICollector<T>/IAsyncCollector<T> - -_TODO_ - #### Array -_TODO_ +https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/AddProductsArray #### Single Row -_TODO_ +https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/AddProduct ## Trigger Binding -> Trigger binding support is only available for in-proc C# functions at present. \ No newline at end of file +> Trigger binding support is only available for in-proc C# functions at present. From 1e39a9c107a5c35ba4bf9ec45040696cc7302bc4 Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Thu, 9 Feb 2023 16:41:07 -0800 Subject: [PATCH 2/2] Update docs/SetupGuide_Python.md Co-authored-by: Charles Gagnon --- docs/SetupGuide_Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SetupGuide_Python.md b/docs/SetupGuide_Python.md index 78125eca8..0569f32c1 100644 --- a/docs/SetupGuide_Python.md +++ b/docs/SetupGuide_Python.md @@ -133,7 +133,7 @@ _TODO_ `SelectProductsCost` is the name of a procedure stored in the user's database. In this case, CommandType is `StoredProcedure`. The parameter value of the `@Cost` parameter in the procedure is once again the `{cost}` specified in the `getproducts-storedprocedure/{cost}` URL. -https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProductsStoredProcedure + ## Output Binding