diff options
| author | abeloin <alexandre.beloin@gmail.com> | 2013-12-25 19:40:53 -0500 |
|---|---|---|
| committer | abeloin <alexandre.beloin@gmail.com> | 2013-12-25 19:40:53 -0500 |
| commit | 316500dca40f7d861af394d6db27f14302255622 (patch) | |
| tree | bdac66b4be6b2d9faff178b41e349c714e4d5005 /MediaBrowser.Server.Implementations/Persistence | |
| parent | 68cf16416ba4fb88293b2bdac9867c5534fd7357 (diff) | |
-Replaced Mono.Data.SQLite by System.Data.SQLite(ManagedOnly)
-Added System.Data.SQLite and Sqlite3 into ThirdParty
-Depending of the OS, System.Data.SQLite will look for:
sqlite3.dll in Windows(Provided with the project)
libsqlite3.so.0 in Linux(Need to be installed. ie yum install sqlite.i686)
libsqlite3.dylib in MacOS X(!?)
(See http://www.mono-project.com/Interop_with_Native_Libraries for more info)
Diffstat (limited to 'MediaBrowser.Server.Implementations/Persistence')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs index 9836de7350..0b3d5f7847 100644 --- a/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs +++ b/MediaBrowser.Server.Implementations/Persistence/SqliteExtensions.cs @@ -1,11 +1,7 @@ using MediaBrowser.Model.Logging; using System; using System.Data; -#if __MonoCS__ -using Mono.Data.Sqlite; -#else using System.Data.SQLite; -#endif using System.IO; using System.Threading.Tasks; @@ -140,18 +136,6 @@ namespace MediaBrowser.Server.Implementations.Persistence logger.Info("Opening {0}", dbPath); - #if __MonoCS__ - var connectionstr = new SqliteConnectionStringBuilder - { - PageSize = 4096, - CacheSize = 4096, - SyncMode = SynchronizationModes.Normal, - DataSource = dbPath, - JournalMode = SQLiteJournalModeEnum.Off - }; - - var connection = new SqliteConnection(connectionstr.ConnectionString); -#else var connectionstr = new SQLiteConnectionStringBuilder { PageSize = 4096, @@ -162,7 +146,7 @@ namespace MediaBrowser.Server.Implementations.Persistence }; var connection = new SQLiteConnection(connectionstr.ConnectionString); -#endif + await connection.OpenAsync().ConfigureAwait(false); return connection; |
