Closed agrinei closed 1 year ago
Confirmed using test GetByColumn(string dataSourceName, DataSourceType mode)
GetByColumn
calls GetByKey
, so this will fix the latter as well.
This appears to also affect the Update/Delete By Key functions. Basically anything that doesn't use the ParameterBuilderCallback
. So we can just create a universal CreateParameter
method and move the guts of ParameterBuilderCallback
into it.
All tests passing.
@agrinei Is this a current problem for you or can it wait for the next release?
Well, my real need is SqlServerDataSource.Sql and I see how complex it is. Next release is fine.
Released in v4.4.0.
@agrinei Thank you for your help on these changes.
I'm very thankful for your attention, @Grauenwolf
You're welcome. Feel free to reach out if you need anything else.
This is the same as #402 #414 but for SqlServerDataSource.GetByColumn
When calling SqlServerDataSource.GetByColumn it doesn't use column max length definition to set string parameters what could generate multiple query plans. It does work when we call SqlServerDataSource.From
[IT USES COLUMN DEFINITION] sqlServerDataSource.From("MY_TABLE_NAME", new { my_column_name = "COLUMN_VALUE" })
[IT DOESN'T USE COLUMN DEFINITION] sqlServerDataSource.GetByColumn("MY_TABLE_NAME", "my_column_name", "COLUMN_VALUE")
Versions tested:
Tortuga.Chain.SqlServer v.4.3.0 Tortuga.Chain.SqlServer.MDS v.4.3.0