You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -554,6 +558,20 @@ Note: This tutorial requires that a SQL database is setup as shown in [Create a
554
558
- Hit 'F5' to run your code. Click the link to upsert the output array values in your SQL table. Your upserted values should launch in the browser.
555
559
- Congratulations! You have successfully created your first SQL output binding! Checkout [Output Binding](#Output-Binding) for more information on how to use it and explore on your own!
556
560
561
+
## Configuration
562
+
563
+
This section goes over some of the configuration values you can use to customize the SQL bindings. See [How to Use Azure Function App Settings](https://learn.microsoft.com/azure/azure-functions/functions-how-to-use-azure-function-app-settings) to learn more.
564
+
565
+
### Trigger Binding Configuration
566
+
567
+
#### Sql_Trigger_BatchSize
568
+
569
+
This controls the number of changes processed at once before being sent to the triggered function.
570
+
571
+
#### Sql_Trigger_PollingIntervalMs
572
+
573
+
This controls the delay in milliseconds between processing each batch of changes.
574
+
557
575
## More Samples
558
576
559
577
### Input Binding
@@ -567,8 +585,8 @@ The input binding takes four [arguments](https://github.com/Azure/azure-function
567
585
568
586
The following are valid binding types for the result of the query/stored procedure execution:
569
587
570
-
- **IEnumerable<T>**: Each element is a row of the result represented by `T`, where `T` is a user-defined POCO, or Plain Old C# Object. `T` should follow the structure of a row in the queried table. See the [Query String](#query-string) section for an example of what `T` should look like.
571
-
- **IAsyncEnumerable<T>**: Each element is again a row of the result represented by `T`, but the rows are retrieved "lazily". A row of the result is only retrieved when `MoveNextAsync` is called on the enumerator. This is useful in the case that the query can return a very large amount of rows.
588
+
- **IEnumerable<T>**: Each element is a row of the result represented by `T`, where `T` is a user-defined POCO, or Plain Old C# Object. `T` should follow the structure of a row in the queried table. See the [Query String](#query-string) section for an example of what `T` should look like.
589
+
- **IAsyncEnumerable<T>**: Each element is again a row of the result represented by `T`, but the rows are retrieved "lazily". A row of the result is only retrieved when `MoveNextAsync` is called on the enumerator. This is useful in the case that the query can return a very large amount of rows.
572
590
- **String**: A JSON string representation of the rows of the result (an example is provided [here](https://github.com/Azure/azure-functions-sql-extension/blob/main/samples/samples-csharp/InputBindingSamples/GetProductsString.cs)).
573
591
- **SqlCommand**: The SqlCommand is populated with the appropriate query and parameters, but the associated connection is not opened. It is the responsiblity of the user to execute the command and read in the results. This is useful in the case that the user wants more control over how the results are read in. An example is provided [here](https://github.com/Azure/azure-functions-sql-extension/blob/main/samples/samples-csharp/InputBindingSamples/GetProductsSqlCommand.cs).
574
592
@@ -708,13 +726,13 @@ The output binding takes two [arguments](https://github.com/Azure/azure-function
708
726
709
727
The following are valid binding types for the rows to be upserted into the table:
710
728
711
-
- **ICollector<T>/IAsyncCollector<T>**: Each element is a row represented by `T`, where `T` is a user-defined POCO, or Plain Old C# Object. `T` should follow the structure of a row in the queried table. See the [Query String](#query-string) for an example of what `T` should look like.
729
+
- **ICollector<T>/IAsyncCollector<T>**: Each element is a row represented by `T`, where `T` is a user-defined POCO, or Plain Old C# Object. `T` should follow the structure of a row in the queried table. See the [Query String](#query-string) for an example of what `T` should look like.
712
730
- **T**: Used when just one row is to be upserted into the table.
713
731
- **T[]**: Each element is again a row of the result represented by `T`. This output binding type requires manual instantiation of the array in the function.
714
732
715
733
The repo contains examples of each of these binding types [here](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharp/OutputBindingSamples). A few examples are also included below.
716
734
717
-
#### ICollector<T>/IAsyncCollector<T>
735
+
#### ICollector<T>/IAsyncCollector<T>
718
736
719
737
When using an `ICollector`, it is not necessary to instantiate it. The functioncan add rows to the `ICollector` directly, and its contents are automatically upserted once the functionexits.
The performance tests are based on the IntegrationTestBase class. Follow the instructions to set up the pre-requisites for integration tests [here](../test/README.md#running-integration-tests).
5
+
6
+
## Run
7
+
The performance tests use BenchmarkDotNet to benchmark performance for input and output bindings.
8
+
9
+
Run the tests from the terminal.
10
+
```
11
+
cd performance
12
+
dotnet run -c Release
13
+
```
14
+
15
+
## Results
16
+
The test results will be generated in the BenchmarkDotNet.Artifacts folder.
0 commit comments