Closed ekalchev closed 3 years ago
Porting System.Data.SQLite to SQLitePCLRaw would be a non-trivial undertaking, but it's theoretically possible I suppose.
You might consider Microsoft.Data.Sqlite, which is an ADO.NET implementation like System.Data.Sqlite is. But it's not a drop-in replacement.
Here are more details about how they're different.
According to some posts on StackOverflow Microsoft.Data.Sqlite is 3x slower than System.Data.SQLite and it missing some stuff, like sqlite3_update_hook in the managed implementation, because of that it is not an options for me.
I have .netstandard2.0 code base that use System.Data.SQLite for its data access. I would like to run this code under Xamarin IOS. The problem with System.Data.SQLite is that it doesn't have native code assembly for IOS. I wonder if I could somehow use SQLitePCL.raw to intercept native calls from the managed code. I can see in the source code they use PInvoke with [DllImport(SQLITE_DLL)] Is it possible to route those calls to SQLitePCL.raw and have this working without modification of the extisting code base (only modification to System.Data.SQLite managed code assembly)?