Skip to content

Conversation

@lucyzhang929
Copy link
Contributor

No description provided.

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.

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

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

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

_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
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.

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
@lucyzhang929
Copy link
Contributor Author

Opened a new PR to address comments - closing this one.

@lucyzhang929 lucyzhang929 deleted the lucyzhang929-patch-1 branch March 27, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants