Is there a way to prevent custom function to add TypeName as the last argument?
See original GitHub issueI’ve created custom function for PostgreSql
[CLSCompliant(false)]
[Sql.Function("Coalesce", InlineParameters = true, ServerSideOnly = true)]
public static T Coalesce<T>(T first, T second)
{
throw new InvalidOperationException("Coalesce is server-only function");
}
And it generates this sql
select
Coalesce(t1.id, t2.id, uuid),
Coalesce(t1.tc, t2.tc, TimeStamp)
from table1 t1
full join table2 t2
on t1.tc = t2.tc and t1.id = t2.id
;
As you can see there are uuid
and TimeStamp
as third arguments of Coalesce
.
Postgre returns ERROR: column "uuid" does not exist
How can I fix it? Any ideas?
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
c++ - Function passed as template argument
I'm looking for the rules involving passing C++ templates functions as arguments. This is supported by C++ as shown by an example here:...
Read more >Template argument deduction
Template argument deduction is used when taking an address of an overload set, which includes function templates.
Read more >Template parameters and template arguments
When the name of a non-type template parameter is used in an expression within the body of the class template, it is an...
Read more >Key arguments in Apollo Client
You can define a completely different format for a field's storage key by providing a custom function to keyArgs . This function takes...
Read more >On writing functions that accept any specialization of a C++ ...
Suppose you want to write a template function that accepts any specialization of std::vector . Your first try would probably be something ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not yet, we plan to do that in v5.0
Okay. I found it. There is
IgnoreGenericParameters
property inSql.FunctionAttribute
. It is exactly what I wanted.