private async Task <bool> VerifyCollectionModel(IDocumentDatabase db, CollectionModel model) { (await db.CollectionExist(_workContext, _collectionName)).Should().BeTrue(); IDocumentCollection <TestDocument> collection = db.GetCollection <TestDocument>(_collectionName); foreach (var indexDetail in model.Indexes) { IndexDetailV1 detail = await collection.Index.GetIndexDetail(_workContext, indexDetail.Name); detail.Should().NotBeNull(); if (!indexDetail.IsEquals(detail)) { return(false); } } IEnumerable <IndexDetailV1> dbIndex = await collection.Index.ListIndexes(_workContext); dbIndex.Should().NotBeNull(); dbIndex.Count().Should().Be(model.Indexes.Count + 1); return(dbIndex .Where(x => x.Name != "_id_") .OrderBy(x => x.Name) .Zip(model.Indexes.OrderBy(x => x.Name), (d, m) => new { Db = d, Model = m }) .All(x => x.Model.IsEquals(x.Db))); }
/// <inheritdoc /> public Key GetNextKey(IDocumentCollection <T> collection, T entity) { string collectionName = collection.ConfigurationTyped.Name; int ParseKey(string key) { if (key.Length > collectionName.Length + 1 && key.StartsWith(collectionName)) { key = key.Substring(collectionName.Length + 1); } return(int.Parse(key)); } int max = _startValue; if (collection.Count > 0) { max = collection .Find(arg => true) .Select(collection.GetKey) .Select(ParseKey) .Max(); } int nextId = max + 1; return(new Key(KeyType.Identity, nextId.ToString(), collectionName)); }
public static async Task <IEnumerable <T> > Find <T>(this IDocumentCollection <T> self, IWorkContext context, IInstructionCollection instruction) { Verify.IsNotNull(nameof(self), self); Verify.IsNotNull(nameof(instruction), instruction); IInstructionCollection and = instruction as And; IInstructionCollection or = instruction as Or; IInstructionCollection andOr = and ?? or; if (andOr != null) { return(await self.Find(context, andOr.ToDocument())); } OrderBy orderBy = instruction.OfType <OrderBy>().SingleOrDefault(); Projection projection = instruction.OfType <Projection>().SingleOrDefault(); FindOptions <T, T> options = new FindOptions <T, T> { Sort = orderBy?.ToDocument(), Projection = projection?.ToDocument(), }; Query query = instruction.OfType <Query>().FirstOrDefault(); return(await self.Find(context, query?.ToDocument() ?? new BsonDocument(), options)); }
public async Task CreateReadTestWithDatabaseInConnectionString() { const string connectionDatabaseName = "TestIndexDatabase2"; string connectionString = Constants.CreateConnectionString(connectionDatabaseName); IDocumentDatabase db = new DocumentDatabase(connectionString); IDocumentCollection <TestDocument> collection = db.GetCollection <TestDocument>(_collectionName); TestDocument test = CreateTestDocument(0); await collection.Insert(_workContext, test); IEnumerable <TestDocument> results = await collection.Find(_workContext, new BsonDocument()); results.Should().NotBeNull(); results.Count().Should().Be(1); TestDocument result = results.First(); result.Should().NotBeNull(); result.Index.Should().Be(test.Index); result.FirstName.Should().Be(test.FirstName); result.LastName.Should().Be(test.LastName); result.Birthdate.ToString("s").Should().Be(test.Birthdate.ToString("s")); result.Address1.Should().Be(test.Address1); result.Address2.Should().Be(test.Address2); result.City.Should().Be(test.City); result.State.Should().Be(test.State); result.ZipCode.Should().Be(test.ZipCode); await db.DocumentServer.DropDatabase(_workContext, connectionDatabaseName); }
private void CreateKeyValues(Action <IDocumentCollection <KeyValueDocument> > operation) { if (!Directory.Exists(localStorageDirPath)) { Directory.CreateDirectory(localStorageDirPath); } try { using (IDocumentCollection <KeyValueDocument> obj = documentCollectionFactory.CreateHighSecurityFileSystemCollection <KeyValueDocument>(localStorageDirPath, databaseEncryptionKey)) { operation(obj); } } catch { bool recovered = true; if (Directory.Exists(localStorageDirPath)) { try { Directory.Delete(localStorageDirPath, recursive: true); } catch (Exception ex) { Log.LogErrorFormatted(this, "Unable to delete storage directory: {0}, {1}", localStorageDirPath, ex); recovered = false; } } Service.Get <EventDispatcher>().DispatchEvent(new CPKeyValueDatabaseErrorEvents.CorruptionErrorEvent(recovered)); } }
public PatchaWalletDbClient(IOptions <MongoDbOptions> optionsAccessor) { _options = optionsAccessor.Value; _client = new MongoClient(_options.Connection); SimulateGoalsCollection = new DocumentCollection <SimulateGoalDocument>(_client, _options.DatabaseId, SIMULATEGOALS_COLLECTION_ID); }
internal void SaveCollection <T>(IDocumentCollection <T> collection) where T : class { var serializer = GetSerializer(collection.Configuration); var items = collection.Find(arg => true).ToList(); if (IsMultiFile(collection.Configuration)) { foreach (var item in items) { var fileContent = serializer.Serialize(new[] { item }, collection.Configuration.DocumentType); var collectionDir = collection.Configuration.SourceFile; var key = collection.GetKey(item); var serializerInfo = serializer.GetInfo(); var fileName = Path.Combine(collectionDir, key + serializerInfo.Extension); _configuration.StorageEngine.WriteFile(fileName, fileContent); } } else { var fileContent = serializer.Serialize(items, collection.Configuration.DocumentType); _configuration.StorageEngine.WriteFile(collection.Configuration.SourceFile, fileContent); } collection.HasChanges = false; }
public PatchaWalletDbClient(IOptions <MongoDbOptions> optionsAccessor) { _options = optionsAccessor.Value; _client = new MongoClient(_options.Connection); StocksCollection = new DocumentCollection <Stock>(_client, _options.DatabaseId, STOCK_COLLECTION_ID); }
public FileStore(Storage storage) { Storage = storage.GetStorageForDirectory(@"files"); Store = new StorageBackedResourceStore(Storage); Data = new DataStore($"{storage.GetFullPath(string.Empty)}/files.json"); Context = Data.GetCollection <FileMetadata>(); }
public static async Task <IEnumerable <T> > Aggregate <T>(this IDocumentCollection <T> self, IWorkContext context, Aggregate aggregate) { Verify.IsNotNull(nameof(self), self); Verify.IsNotNull(nameof(aggregate), aggregate); return(await self.Aggregate(context, aggregate.ToDocuments())); }
public IInternalSession Create(string swid) { byte[] localStorageKey = keychain.LocalStorageKey; IDocumentCollection <AlertDocument> documentCollection = GetDocumentCollection <AlertDocument>(swid, "Alerts", databaseDirectoryCreator, localStorageKey, documentCollectionFactory); IDocumentCollection <FriendDocument> documentCollection2 = GetDocumentCollection <FriendDocument>(swid, "Friends", databaseDirectoryCreator, localStorageKey, documentCollectionFactory); IDocumentCollection <FriendInvitationDocument> documentCollection3 = GetDocumentCollection <FriendInvitationDocument>(swid, "FriendInvitations", databaseDirectoryCreator, localStorageKey, documentCollectionFactory); IDocumentCollection <UserDocument> documentCollection4 = GetDocumentCollection <UserDocument>(swid, "Users", databaseDirectoryCreator, localStorageKey, documentCollectionFactory); databaseCorruptionHandler.Add(documentCollection4); string dirPath = BuildDocCollectionPath(databaseDirectoryCreator, swid); UserDatabase userDatabase = new UserDatabase(documentCollection, documentCollection2, documentCollection3, documentCollection4, localStorageKey, dirPath, epochTime, documentCollectionFactory, databaseCorruptionHandler, coroutineManager); database.ClearServerTimeOffsetMillis(); epochTime.OffsetMilliseconds = database.GetServerTimeOffsetMillis() ?? 0; logger.Debug("Initial time offset: " + epochTime.Offset); SessionDocument sessionDocument = database.GetSessionDocument(swid); keychain.PushNotificationKey = sessionDocument.CurrentSymmetricEncryptionKey; IWebCallEncryptor webCallEncryptor = webCallEncryptorFactory.Create(sessionDocument.CurrentSymmetricEncryptionKey, sessionDocument.SessionId); IGuestControllerClient guestControllerClient = guestControllerClientFactory.Create(swid); ISessionRefresher sessionRefresher = sessionRefresherFactory.Create(mixSessionStarter, guestControllerClient); IMixWebCallFactory mixWebCallFactory = mixWebCallFactoryFactory.Create(webCallEncryptor, swid, sessionDocument.GuestControllerAccessToken, sessionRefresher); guestControllerClient.OnAccessTokenChanged += delegate(object sender, AbstractGuestControllerAccessTokenChangedEventArgs e) { mixWebCallFactory.GuestControllerAccessToken = e.GuestControllerAccessToken; }; AssetLoader assetLoader = new AssetLoader(logger, wwwCallFactory); IList <IInternalFriend> friends = CreateFriends(userDatabase); AgeBandType ageBandType = AgeBandTypeConverter.Convert(sessionDocument.AgeBand); DateTime lastRefreshTime = epochTime.FromSeconds(sessionDocument.LastProfileRefreshTime); RegistrationProfile registrationProfile = new RegistrationProfile(logger, sessionDocument.DisplayNameText, sessionDocument.ProposedDisplayName, sessionDocument.ProposedDisplayNameStatus, sessionDocument.FirstName, sessionDocument.AccountStatus, lastRefreshTime, sessionDocument.CountryCode); GetStateResponseParser getStateResponseParser = new GetStateResponseParser(logger); NotificationPoller notificationPoller = new NotificationPoller(logger, mixWebCallFactory, notificationQueue, pollCountdownStopwatch, getStateResponseParser, epochTime, random, database, swid); DisplayName displayName = new DisplayName(sessionDocument.DisplayNameText); LocalUser localUser = new LocalUser(logger, displayName, swid, friends, ageBandType, database, userDatabase, registrationProfile, mixWebCallFactory, guestControllerClient, notificationQueue, encryptor, epochTime); Session session = new Session(logger, localUser, sessionDocument.GuestControllerAccessToken, sessionDocument.PushNotificationToken != null, notificationPoller, coroutineManager, database, userDatabase, guestControllerClient, mixWebCallFactory, epochTime, databaseCorruptionHandler, sessionStatus, keychain, getStateResponseParser, clientVersion, notificationQueue); try { NotificationHandler.Handle(notificationDispatcher, userDatabase, localUser, epochTime); notificationQueue.LatestSequenceNumber = sessionDocument.LatestNotificationSequenceNumber; IEnumerable <IncomingFriendInvitation> incomingFriendInvitations = GetIncomingFriendInvitations(userDatabase, localUser); foreach (IncomingFriendInvitation item in incomingFriendInvitations) { localUser.AddIncomingFriendInvitation(item); } IEnumerable <OutgoingFriendInvitation> outgoingFriendInvitations = GetOutgoingFriendInvitations(userDatabase, localUser); foreach (OutgoingFriendInvitation item2 in outgoingFriendInvitations) { localUser.AddOutgoingFriendInvitation(item2); } } catch (Exception) { session.Dispose(); throw; } return(session); }
public async Task CreateReadTest() { IDocumentDatabase db = _documentServer.GetDatabase(_workContext, _dbName); IDocumentCollection <TestDocument> collection = db.GetCollection <TestDocument>(_collectionName); TestDocument test = CreateTestDocument(0); await collection.Insert(_workContext, test); IEnumerable <TestDocument> results = await collection.Find(_workContext, new BsonDocument()); results.Should().NotBeNull(); results.Count().Should().Be(1); TestDocument result = results.First(); result.Should().NotBeNull(); result.Index.Should().Be(test.Index); result.FirstName.Should().Be(test.FirstName); result.LastName.Should().Be(test.LastName); result.Birthdate.ToString("s").Should().Be(test.Birthdate.ToString("s")); result.Address1.Should().Be(test.Address1); result.Address2.Should().Be(test.Address2); result.City.Should().Be(test.City); result.State.Should().Be(test.State); result.ZipCode.Should().Be(test.ZipCode); }
private ProductRepository() { // Open database (create new if file doesn't exist) _store = new DataStore("products.json"); // Get employee collection _collection = _store.GetCollection <Product>(); }
public AdminRepository() { // Open database (create new if file doesn't exist) _store = new DataStore("admins.json"); // Get employee collection _collection = _store.GetCollection <User>(); }
private OrderRepository() { // Open database (create new if file doesn't exist) _store = new DataStore("orders.json"); // Get employee collection _collection = _store.GetCollection <Order>(); }
public async Task CreateSingleIndexTest() { await _documentServer.DropDatabase(_workContext, _dbName); IDocumentDatabase db = _documentServer.GetDatabase(_workContext, _dbName); await db.CreateCollection(_workContext, _collectionName); IDocumentCollection <TestDocument> collection = db.GetCollection <TestDocument>(_collectionName); IEnumerable <IndexDetailV1> list = await collection.Index.ListIndexes(_workContext); list.Should().NotBeNull(); list.Count().Should().Be(1); list.First().Name.Should().Be("_id_"); var model = new CollectionIndex { Name = "TestIndex_1", Unique = true, Sparse = false, Keys = new List <IndexKey> { new IndexKey { FieldName = "FirstName" }, new IndexKey { FieldName = "Last Name" }, } }; await collection.Index.CreateIndex(_workContext, model); list = await collection.Index.ListIndexes(_workContext); list.Should().NotBeNull(); list.Count().Should().Be(2); list.First().Name.Should().Be("_id_"); IndexDetailV1 detail = list.Skip(1).First(); detail.Name.Should().Be(model.Name); detail.Unique.Should().Be(model.Unique); detail.Sparse.Should().Be(model.Sparse); detail.Keys.Count.Should().Be(model.Keys.Count); detail.Keys[0].FieldName.Should().Be(model.Keys[0].FieldName); detail.Keys[0].Descending.Should().Be(model.Keys[0].Descending); detail.Keys[1].FieldName.Should().Be(model.Keys[1].FieldName); detail.Keys[1].Descending.Should().Be(model.Keys[1].Descending); await db.DropCollection(_workContext, _collectionName); await _documentServer.DropDatabase(_workContext, _dbName); }
private static void UpdateFriend(IDocumentCollection <FriendDocument> friends, string swid, Action <FriendDocument> update) { FriendDocument[] array = (from id in EnumerateFriendDocumentIds(friends, swid) select friends.Find(id)).ToArray(); foreach (FriendDocument friendDocument in array) { update(friendDocument); friends.Update(friendDocument); } }
public async Task ApplyCappedCollectionModelWithIndex() { const int maxDocuments = 100; const int maxSizeInBytes = maxDocuments * 1000; var model = new CappedCollectionModel { CollectionName = _collectionName, MaxSizeInBytes = maxSizeInBytes, MaxNumberOfDocuments = maxDocuments, Indexes = new List <CollectionIndex> { new CollectionIndex { Name = "TestIndex_1", Unique = true, Keys = new List <IndexKey> { new IndexKey { FieldName = "Field1", Descending = false }, } } } }; var package = new CollectionModelPackage(_documentDatabase, model, new CollectionModelSettings { ReCreate = true }); bool result = await package.Apply(_workContext); result.Should().BeTrue(); (await _documentDatabase.CollectionExist(_workContext, _collectionName)).Should().BeTrue(); CollectionDetailV1 detail = await _documentDatabase.GetCollectionDetail(_workContext, _collectionName); detail.Should().NotBeNull(); detail.Name.Should().Be(_collectionName); detail.Type.Should().Be("collection"); detail.Readonly.Should().BeFalse(); detail.Capped.Should().BeTrue(); detail.MaxDocuments.Should().HaveValue(); detail.MaxDocuments.Should().Be(maxDocuments); detail.MaxSizeInBytes.Should().HaveValue(); detail.MaxSizeInBytes.Should().BeGreaterOrEqualTo(maxSizeInBytes); IDocumentCollection <TestDocument> collection = _documentDatabase.GetCollection <TestDocument>(_collectionName); IndexDetailV1 indexDetail = await collection.Index.GetIndexDetail(_workContext, model.Indexes[0].Name); indexDetail.Should().NotBeNull(); indexDetail.Keys.Count.Should().Be(1); model.Indexes[0].IsEquals(indexDetail).Should().BeTrue(); }
public RoleRepository(IIdentityConfiguration identityConfiguration) { Verify.IsNotNull(nameof(identityConfiguration), identityConfiguration); _configuration = identityConfiguration; _collection = new DocumentServer(_configuration.ConnectionString) .GetDatabase(_configuration.DatabaseName) .GetCollection <HeaderDoc <UserRoleDoc> >(_configuration.IdentityRoleCollectionName); _tag = new Tag($"{nameof(RoleRepository)}/{_configuration.DatabaseName}/{_configuration.IdentityRoleCollectionName}"); }
private static void CheckPersons(IDocumentCollection <Person> collection) { var person = collection.Find(_ => _.Id == "2").First(); person.Should().NotBeNull(); person.FirstName.Should().Be("Steve"); person.LastName.Should().Be("Ballmer"); person = collection.Get("1"); person.Should().NotBeNull(); person.FirstName.Should().Be("Bill"); person.LastName.Should().Be("Gates"); }
int globalLastId; // Used for auto incrementation of the book id public LibraryService() { store = new DataStore("data.json"); //Reads data from data.json collection = store.GetCollection <Book>("books"); // Parse the data collection called 'books' if (collection.AsQueryable().Count() != 0) //Handles the program behavior if the data file is empty { globalLastId = collection.AsQueryable().Last().Id; } else { globalLastId = 1; } }
public static void Connect(string collectionName) { if (Collection != null) { throw new TraceStateException("Connection already established."); } ArangoDatabase.ChangeSetting(s => { s.Database = "test"; s.Url = "http://localhost:8529"; // you can set other settings if you need s.Credential = new NetworkCredential("root", ""); s.SystemDatabaseCredential = new NetworkCredential("root", ""); }); client = ArangoDatabase.CreateWithSetting(); //client.CreateDatabase(Dns.GetHostName()); //just to update the description state var databases = client.ListDatabases(); if (client.Connection == null) { throw new TraceStateException("Local db is unreachable."); } //client.CreateCollection("logggs"); Collection = client.Collection(collectionName); Buffers = new LogBuffer[NumberOfBuffers]; for (int i = 0; i < NumberOfBuffers; i++) { Buffers[i] = new LogBuffer(); } Arbiter = new Arbiter2(Buffers); //I create a new delegate in order to call a method with a Conditional Attribute Arbiter.OnAllBuffersFilled += delegate { Flush(); }; timer = new Timer(2000); timer.AutoReset = true; timer.Elapsed += delegate { Timer_Elapsed(null, null); }; timer.Start(); }
public UserDatabase(IDocumentCollection <AlertDocument> alerts, IDocumentCollection <FriendDocument> friends, IDocumentCollection <FriendInvitationDocument> friendInvitations, IDocumentCollection <UserDocument> users, byte[] encryptionKey, string dirPath, IEpochTime epochTime, IDocumentCollectionFactory documentCollectionFactory, DatabaseCorruptionHandler databaseCorruptionHandler, ICoroutineManager coroutineManager) { this.alerts = alerts; this.friends = friends; this.friendInvitations = friendInvitations; this.users = users; this.encryptionKey = encryptionKey; this.dirPath = dirPath; this.epochTime = epochTime; this.documentCollectionFactory = documentCollectionFactory; this.databaseCorruptionHandler = databaseCorruptionHandler; this.coroutineManager = coroutineManager; callbacks = new Dictionary <long, Action>(); pendingIndexedThreads = new List <long>(); }
private async Task <IEnumerable <string> > GetIndexesNotInSource(IWorkContext context) { IDocumentCollection <BsonDocument> collection = Parent.Database.GetCollection <BsonDocument>(Parent.Model.CollectionName); IEnumerable <IndexDetailV1> indexList = await collection.Index.ListIndexes(context); if (indexList == null && indexList.Count() == 0) { return(null); } return(indexList .Select(x => x.Name) .Where(x => !_excludeList.Contains(x)) .Except((Parent.Model.Indexes ?? Enumerable.Empty <CollectionIndex>()).Select(x => x.Name)).ToList()); }
public async Task <bool> Set(IWorkContext context) { Verify.IsNotNull(nameof(context), context); context = context.WithTag(_tag); IDocumentCollection <BsonDocument> collection = Parent.Database.GetCollection <BsonDocument>(Parent.Model.CollectionName); if ((await collection.Index.IndexExist(context, Index.Name))) { await collection.Index.DropIndex(context, Index.Name); } await collection.Index.CreateIndex(context, Index); return(true); }
public async Task SmallCappedOverFiveCollectionTest() { const int maxDocuments = 10; const int maxSizeInBytes = maxDocuments * 1000; const int createDocumentCount = maxDocuments + 5; var model = new CappedCollectionModel { CollectionName = _collectionName, MaxSizeInBytes = maxSizeInBytes, MaxNumberOfDocuments = maxDocuments, }; var package = new CollectionModelPackage(_documentDatabase, model, new CollectionModelSettings { ReCreate = true }); bool result = await package.Apply(_workContext); result.Should().BeTrue(); IDocumentCollection <TestDocument> collection = _documentDatabase.GetCollection <TestDocument>(_collectionName); foreach (var index in Enumerable.Range(0, createDocumentCount)) { TestDocument doc = CreateTestDocument(index); await collection.Insert(_workContext, doc); } long count = await collection.Count(_workContext); count.Should().Be(maxDocuments); IEnumerable <TestDocument> results = await collection.Find(_workContext, new BsonDocument()); results.Should().NotBeNull(); results.Count().Should().Be(maxDocuments); int testIndex = createDocumentCount - maxDocuments; foreach (var item in results.OrderBy(x => x.Index)) { TestDocument compareDoc = CreateTestDocument(testIndex++); item.IsEqual(compareDoc).Should().BeTrue(); } }
public DocumentSearchTests() { _documentServer = new DocumentServer(Constants.ConnectionString); _testDocuments = Enumerable.Range(0, 10) .Select(x => CreateTestDocument(x)) .OrderBy(x => x._id) .ToList(); IDocumentDatabase db = _documentServer.GetDatabase(_workContext, _dbName); _collection = db.GetCollection <TestDocument>(_collectionName); ResetDatabase() .GetAwaiter() .GetResult(); }
public RepositoryBase(ContextBase contextBase) { _contextBase = contextBase; var networkCredential = new NetworkCredential(_contextBase.User, _contextBase.Password); var settings = new DatabaseSharedSetting { Url = _contextBase.Url, Database = _contextBase.DatabaseName, Credential = networkCredential, SystemDatabaseCredential = networkCredential, }; db = new ArangoDatabase(settings); _document = db.Collection <T>(); }
public async Task ApplyCollectionModelFull() { IDocumentDatabase db = _documentServer.GetDatabase(_workContext, _dbName); var model = new CollectionModel { CollectionName = _collectionName, Indexes = new List <CollectionIndex> { new CollectionIndex { Name = "TestIndex_1", Unique = true, Keys = new List <IndexKey> { new IndexKey { FieldName = "Field1", Descending = false }, } } } }; var package = new CollectionModelPackage(db, model, new CollectionModelSettings { ReCreate = true }); bool result = await package.Apply(_workContext); result.Should().BeTrue(); (await db.CollectionExist(_workContext, _collectionName)).Should().BeTrue(); IDocumentCollection <TestDocument> collection = db.GetCollection <TestDocument>(_collectionName); IndexDetailV1 detail = await collection.Index.GetIndexDetail(_workContext, model.Indexes[0].Name); detail.Should().NotBeNull(); detail.Keys.Count.Should().Be(1); model.Indexes[0].IsEquals(detail).Should().BeTrue(); await db.DropCollection(_workContext, _collectionName); await _documentServer.DropDatabase(_workContext, _dbName); }
public IEnumerable <T> Load(string databaseName, string collectionName) { if (!this.ConnectionGuard()) { return(null); } IDocumentCollection collection = this.GetDefaultCollection(); if (collection == null) { return(null); } IEnumerable <T> data = this.DatabaseDriver.Get <T>(collection); return(data); }
public PatientViewHandler(ViewDatabase database) { _patients = database.Patients; }
public SubjectViewHandler(ViewDatabase database) { _sites = database.Sites; _subjects = database.Subjects; }
public SubjectHistoryViewHandler(ViewDatabase database) { _subjects = database.Subjects; _history = database.SubjectsHistory; }
private void SetMailAsRead(NotesDocument profileDocument, IDocumentCollection documentCollection) { try { profileDocument.ReplaceItemValue("UntilTime", documentCollection.UntilTime); profileDocument.Save(true, true, true); } catch (Exception e) { Logger logger = LogManager.GetCurrentClassLogger(); logger.Log(LogLevel.Error, e); } }
public SubjectReducedViewHandler(ViewDatabase database) { _subjects = database.SubjectsReduced; }
public SiteViewHandler(ViewDatabase database) { _sites = database.Sites; }
protected internal SqliteCollectionSession CreateCollectionSession(IDocumentCollection collection) { return new SqliteCollectionSession(CreateSession(), collection); }
public SiteHistoryViewHandler(ViewDatabase database) { _sites = database.Sites; _history = database.SitesHistory; }