DapperLib / Dapper.Contrib

Dapper community contributions - additional extensions for Dapper
Other
268 stars 99 forks source link

Snowflake query parameters syntax is not supported #154

Open afilatov-st opened 1 year ago

afilatov-st commented 1 year ago

In Snowflake, query parameters do not start with @. They either start with : or are anonymous (?). Dapper supports it (there is even Dapper.SqlMapper.Settings.UseIncrementalPseudoPositionalParameterNames setting).

However, Dapper.Contribs' Get() method has @ hardcoded, which causes Snowflake error like SQL compilation error: syntax error line 1 at position 45 unexpected '@id'.

jonataspc commented 1 year ago

There is a opened PR (https://github.com/DapperLib/Dapper.Contrib/pull/152) to set a custom parameter prefix.