I want to implement a function for System.Data.SQLite in C#. Implementing the SQLiteFunction interface is easy (seen examples over the Internet).
The question is where should I put the compiled code? Do I need the source to be compiled altogether with the System.Data.SQLite project? Do I have a better option, so that my functions will reside in a separate DLL?
Clarification: The function is supposed to be known not only for my C# code but also for sqlite3 client (for example), so I will be able to use it while executing INSERT commands that come in plain text.
SQLite looks at all of your application’s assemblies and recognises types that have the
[SQLiteFunction]attribute. So you can put them wherever you like, as long as that assembly is already loaded by the time you make your first SQLite call.If it’s just one or two functions I’d be inclined to put them in one of your application’s existing assemblies.