Hi.
We have decided to support both SQLite and SqlServer in our app. In order to not have to recode some TSQL, I'm trying to write a SQLiteFunction for DATEDIFF with the same syntax, but restricted for my purposes to days, months and years.
So I have a class
[SQLiteFunction(Name = "DATEDIFF", Arguments = 3, FuncType = FunctionType.Scalar)]
public class DATEDIFF : SQLiteFunction
{
public override object Invoke(object[ args)
{
DoSomeStuff()
return Foo();
}
}
How do I hook it up so SQLite knows about it?
The class is a part of my application. Do I need to put it into the sqlite source and recompile it?