mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added siaqodb
This commit is contained in:
parent
c55099ce5a
commit
e44d262a1a
29 changed files with 761 additions and 553 deletions
42
NzbDrone.Core/Datastore/ObjectDbFactory.cs
Normal file
42
NzbDrone.Core/Datastore/ObjectDbFactory.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common;
|
||||
using Sqo;
|
||||
|
||||
namespace NzbDrone.Core.Datastore
|
||||
{
|
||||
public interface IObjectDbFactory
|
||||
{
|
||||
IObjectDatabase CreateMemoryDb();
|
||||
IObjectDatabase Create(string dbPath);
|
||||
}
|
||||
|
||||
public class SiaqoDbFactory : IObjectDbFactory
|
||||
{
|
||||
private readonly DiskProvider _diskProvider;
|
||||
|
||||
public SiaqoDbFactory(DiskProvider diskProvider)
|
||||
{
|
||||
_diskProvider = diskProvider;
|
||||
}
|
||||
|
||||
public IObjectDatabase CreateMemoryDb()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IObjectDatabase Create(string dbPath)
|
||||
{
|
||||
if(!_diskProvider.FolderExists(dbPath))
|
||||
{
|
||||
_diskProvider.CreateDirectory(dbPath);
|
||||
}
|
||||
|
||||
SiaqodbConfigurator.SetTrialLicense("uvhpW4hT5Rtq+Uoyq8MOm1Smon15foxV5iS5bAegIXU=");
|
||||
|
||||
var db = new Siaqodb(dbPath);
|
||||
|
||||
return new SiaqodbProxy(db);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue