sqlkata / querybuilder

SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird
https://sqlkata.com
MIT License
3.08k stars 498 forks source link

Update/Insert statement doesn't accept DbType for parameter arguments #657

Closed KostetskyiYaroslav closed 1 year ago

KostetskyiYaroslav commented 1 year ago

Issue: Update/Insert statement doesn't access DbType so SQLKata can't put right identifiers for rows that need to be managed

Examples: Notifications table has Body column that has NVarChar(MAX) type. During usage of AsUpdate of 2.3.7 version ( even latest probably ) the library doesn't put 'N' idenitfier for the value to be set instead of current value. As the result engine of SQL Server puts question mark symbols instead of all characters ( emoji, all cyclic languages its number about ~50 )

KostetskyiYaroslav commented 1 year ago

It brings some nuances, but here are two workarounds I've found

As the result all characters of the value passed thru the parameter is saved correctly based on column type.