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
So currently if you have a custom binding (which you may want in order to use composite types for instance) it wont work in sql"" or sqls"" interpolators.
I think the way around this is do something like the following:
Basically this adds new interpolators that only accept parameters that can be implicitly bound. Actually it may be the case that this is reasonable to just change sql/sqls interpolators however this would prevent passing anything in that's not bindable, perhaps that's a good thing, but it would prevent doing things like passing a PGobject directly which may be a bit extreme.
The text was updated successfully, but these errors were encountered:
kbrowder
changed the title
There should be a way to automatically use ParameterBinding in sql sqls interpolators
There should be a way to automatically use ParameterBinding in sql and sqls interpolators
Aug 11, 2016
So currently if you have a custom binding (which you may want in order to use composite types for instance) it wont work in sql"" or sqls"" interpolators.
I think the way around this is do something like the following:
And add the following to the SQLInterpolationString class:
Basically this adds new interpolators that only accept parameters that can be implicitly bound. Actually it may be the case that this is reasonable to just change sql/sqls interpolators however this would prevent passing anything in that's not bindable, perhaps that's a good thing, but it would prevent doing things like passing a PGobject directly which may be a bit extreme.
The text was updated successfully, but these errors were encountered: