You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UWP implementation is very similar to the iOS implementation. There are some differences. Most of them are because I didn't have time to port certain features and I haven't needed them. Here's the list of differences:
- Reading and writing blobs isn't supported.
- I didn't port the sqlcipher stuff.
- I didn't port the custom regex SQL function so REGEXP may not be supported.
- `attach` isn't supported.
- Some `open` options aren't supported:
- dblocation. I wasn't sure how to map it to UWP. Also, the Android implementations don't seem to support this.
- key (related to sqlcipher)
- Differences with `delete`:
- The dblocation option isn't supported
- Closes the DB if it's open. This felt like the right thing to do.
All of the code in the SQLite.Net-PCL directory is from https://github.com/oysteinkrog/SQLite.Net-PCL. It provides a thin wrapper around the C SQLite APIs which enables them to be called from C#. A couple of tweaks were made to the code to fix these bugs:
- oysteinkrog/SQLite.Net-PCL#374
- oysteinkrog/SQLite.Net-PCL#375
This implementation requires at least the Windows 10 Anniversary Update. This is because it relies on the version of SQLite that is built into Windows 10 and this was introduced in the Anniversary Update. You can learn more at https://blogs.windows.com/buildingapps/2017/02/06/using-sqlite-databases-uwp-apps/.
With a little work, this module could be updated to support earlier versions of Windows 10. Here's how:
- When constructing `SQLiteApiWinRT`, pass `false` for the `useWinSqlite` parameter.
- Install the "SQLite for Universal Windows Platform" extension which will bring a version of SQLite into your app: https://marketplace.visualstudio.com/items?itemName=SQLiteDevelopmentTeam.SQLiteforUniversalWindowsPlatform
TODO:
- backgroundExecuteSqlBatch
- executeSql
- backgroundExecuteSql
Two changes need to be made to all of the
DllImports
for "winsqlite3":Cdecl
toStdCall
ExactSpelling
has to be set totrue
For example:
[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.Cdecl)]
should be:
[DllImport("winsqlite3", EntryPoint = "sqlite3_open", CallingConvention = CallingConvention.StdCall, ExactSpelling = true)]
The text was updated successfully, but these errors were encountered: