Apr 5, 2011 at 12:45 PM
Edited Apr 5, 2011 at 12:46 PM
Regarding support for SQLite
I have looked into the situation with SQLite and how it might be possible to implement a provider for it in DbExpressions.
As mentioned before, SQLite supports only a subset of the functions (string/datetime/numeric) that we see present in most larger database management systems.
In order for the DbExpressions library to have any value, it should implement the API exposed by DbExpressions for every provider.
Failing to do so will result in an incompatibility with other providers and this would defeat the whole purpose of this library in the first place.
But we are not completely lost yet. There are ways to overcome these limitations.
Functions not available in SQLite can be implemented in C#/VB.Net by deriving from the SQLiteFunction class and decorate the class with the SQLiteFunctionAttribute.
There are a few problems here as well because the assembly that implements these custom functions must have a reference to the System.Data.SqlLite assembly.
This may cause problems when the System.Data.SqLite library is updated to a new version.
This could also be solved by using Reflection.Emit to create the functions at runtime and hence not creating such a strong dependency to a specific System.Data.SQLite assembly.
Anyway I will continue to do investigate on this.