This is a case where one could say "if it ain't broke don't fix it".
I noticed stored procedures are executed in SQL batches instead of RPC if we don't pass parameters.
This is a little inconsistent, but there doesn't seem to be a significant difference.
In both cases, SQL Server returns an error if you pass too many arguments.
I can't think of another difference.
Please note that a stored procedure can have default parameters, which means one could call it with or without arguments.
This means that db.Exec("my_proc") and db.Exec("my_proc", 42) both work, but one is an RPC while the other one is an SQL batch, until this PR is merged.
This is a case where one could say "if it ain't broke don't fix it".
I noticed stored procedures are executed in SQL batches instead of RPC if we don't pass parameters. This is a little inconsistent, but there doesn't seem to be a significant difference. In both cases, SQL Server returns an error if you pass too many arguments. I can't think of another difference.
Please note that a stored procedure can have default parameters, which means one could call it with or without arguments. This means that
db.Exec("my_proc")
anddb.Exec("my_proc", 42)
both work, but one is an RPC while the other one is an SQL batch, until this PR is merged.