bitwarden-android/src/UWP/Services/SqlService.cs

22 lines
649 B
C#
Raw Normal View History

using Bit.App.Abstractions;
using SQLite;
using System.IO;
using Windows.Storage;
namespace Bit.UWP.Services
{
public class SqlService : ISqlService
{
public SQLiteConnection GetConnection()
{
var sqliteFilename = "bitwarden.db3";
2017-10-03 05:38:10 +03:00
var path = Path.Combine(ApplicationData.Current.LocalFolder.Path, sqliteFilename);
var conn = new SQLiteConnection(path,
SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create |
SQLiteOpenFlags.FullMutex | SQLiteOpenFlags.SharedCache);
// Return the database connection
return conn;
}
}
}