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
Batching large queries with TSQL will fail to SqlException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
Bug can be replicated by using hello world model provided by Rezoom.SQL.Provider & Rezoom.SQL.Provider.TSQL. Issue has been replicated to large number of different queries. Sample:
open Rezoom
open Rezoom.SQL
open Rezoom.SQL.Plans
open Rezoom.SQL.Migrations
open Rezoom.Execution
open Rezoom.PlanBuilder
type MyModel = SQLModel<".">
type InsertUser = SQL<"""
insert into Users(Name, Email) values (@name, @email);
""">
[<EntryPoint>]
let main _ =
MyModel.Migrate MigrationConfig.Default
let data = List.init 2000 (fun i -> i.ToString() + "@test.com", None)
let task =
plan {
for (email, name) in batch data do
do! InsertUser.Command(email, name).Plan()
}
|> execute ExecutionConfig.Default
task.Wait()
0
This bug was noticed in issue #26 but since it was orginally asked as how-to question I will closed that and opened more clear bug report. As workaround batching and non-batching operations can be manually be used.
Btw library feels pretty stable now in general and we are currently using that for couple of real projects. How about nuget bump after this?
The text was updated successfully, but these errors were encountered:
Batching large queries with TSQL will fail to
SqlException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
Bug can be replicated by using hello world model provided by Rezoom.SQL.Provider & Rezoom.SQL.Provider.TSQL. Issue has been replicated to large number of different queries. Sample:
This bug was noticed in issue #26 but since it was orginally asked as how-to question I will closed that and opened more clear bug report. As workaround batching and non-batching operations can be manually be used.
Btw library feels pretty stable now in general and we are currently using that for couple of real projects. How about nuget bump after this?
The text was updated successfully, but these errors were encountered: