Skip to content
Closed
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
28 changes: 13 additions & 15 deletions docs/SetupGuide_Python.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\<T\>/IAsyncCollector\<T\>](#icollectortiasynccollectort)
- [Array](#array)
- [Single Row](#single-row)
- [Trigger Binding](#trigger-binding)
Expand Down Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned to Maddy in the other one - it'd be better I think to put these descriptions into the functions themselves and then just have this be the link to the function folder. That way people looking at the samples directly can benefit from the descriptions too.


https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProducts
Copy link
Contributor

@Charles-Gagnon Charles-Gagnon Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: One thing I just learned about is that for "proper" markdown raw links like this should be put in <>

https://www.markdownguide.org/basic-syntax#urls-and-email-addresses

Edit: Oh ok...I thought the batching was something I could do to group up suggestions but guess you have to do it. So if you want to combine all these into a single commit instead of having many separate small commits that's an option 😁

Suggested change
https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProducts
<https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProducts>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would include something prior to the link however such as "Sample can be found here." (especially if we plan to just include links by themselves.

That would just be clear and concise. Also would not have to include the long links potentially.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like that. I'd suggest naming the link though - e.g.

See the [GetProducts](...) sample

Although that sounds a bit incomplete to me...but I can't think of anything better myself so if you come up with anything feel free to throw it out as a suggestion and we can see which one we like the best.


#### 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/GetProductsNameEmpty
<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_
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be adding this sample in a follow up PR.


#### 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

Expand Down Expand Up @@ -198,18 +200,14 @@ Note: This tutorial requires that a SQL database is setup as shown in [Create a

### Samples for Output Bindings

#### ICollector&lt;T&gt;/IAsyncCollector&lt;T&gt;

_TODO_

#### Array

_TODO_
https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/AddProductsArray
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/AddProductsArray
<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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-python/AddProduct
<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.
> Trigger binding support is only available for in-proc C# functions at present.