当前位置: 首页>>代码示例>>C#>>正文


C# Impl.TableStorage类代码示例

本文整理汇总了C#中Raven.Database.Storage.Voron.Impl.TableStorage的典型用法代码示例。如果您正苦于以下问题:C# TableStorage类的具体用法?C# TableStorage怎么用?C# TableStorage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TableStorage类属于Raven.Database.Storage.Voron.Impl命名空间,在下文中一共展示了TableStorage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QueueStorageActions

 public QueueStorageActions(TableStorage tableStorage, IUuidGenerator generator, Reference<SnapshotReader> snapshot, Reference<WriteBatch> writeBatch, IBufferPool bufferPool)
     : base(snapshot, bufferPool)
 {
     this.tableStorage = tableStorage;
     this.writeBatch = writeBatch;
     this.generator = generator;
 }
开发者ID:j2jensen,项目名称:ravendb,代码行数:7,代码来源:QueueStorageActions.cs

示例2: GeneralStorageActions

 public GeneralStorageActions(TableStorage storage, Reference<WriteBatch> writeBatch, Reference<SnapshotReader> snapshot, IBufferPool bufferPool)
     : base(snapshot, bufferPool)
 {
     this.storage = storage;
     this.writeBatch = writeBatch;
     this.snapshot = snapshot;
 }
开发者ID:felixmm,项目名称:ravendb,代码行数:7,代码来源:GeneralStorageActions.cs

示例3: MappedResultsStorageActions

        public MappedResultsStorageActions(TableStorage tableStorage, IUuidGenerator generator, OrderedPartCollection<AbstractDocumentCodec> documentCodecs, Reference<SnapshotReader> snapshot, Reference<WriteBatch> writeBatch, IBufferPool bufferPool)
			: base(snapshot, bufferPool)
		{
			this.tableStorage = tableStorage;
			this.generator = generator;
			this.documentCodecs = documentCodecs;
			this.writeBatch = writeBatch;
		}
开发者ID:cocytus,项目名称:ravendb,代码行数:8,代码来源:MappedResultsStorageActions.cs

示例4: SchemaCreator

		public SchemaCreator(InMemoryRavenConfiguration configuration, TableStorage storage, Action<string> output, ILog log)
		{
			this.storage = storage;
			this.output = output;
			this.log = log;

			configuration.Container.SatisfyImportsOnce(this);
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:8,代码来源:SchemaCreator.cs

示例5: IndexingStorageActions

        public IndexingStorageActions(TableStorage tableStorage, IUuidGenerator generator, Reference<SnapshotReader> snapshot, Reference<WriteBatch> writeBatch, IStorageActionsAccessor storageActionsAccessor, IBufferPool bufferPool)
			: base(snapshot, bufferPool)
		{
			this.tableStorage = tableStorage;
			this.generator = generator;
			this.writeBatch = writeBatch;
			this.currentStorageActionsAccessor = storageActionsAccessor;
		}
开发者ID:bbqchickenrobot,项目名称:ravendb,代码行数:8,代码来源:IndexingStorageActions.cs

示例6: UpdateSchemaVersion

		public void UpdateSchemaVersion(TableStorage tableStorage,  Action<string> output)
		{
			using (var tx = tableStorage.Environment.NewTransaction(TransactionFlags.ReadWrite))
			{
				tx.ReadTree(Tables.Details.TableName).Add(tx, "schema_version", ToSchemaVersion);
				tx.Commit();
			}

			tableStorage.SetDatabaseIdAndSchemaVersion(tableStorage.Id, ToSchemaVersion);
		}
开发者ID:paulcbetts,项目名称:ravendb,代码行数:10,代码来源:SchemaUpdateBase.cs

示例7: AttachmentsStorageActions

        public AttachmentsStorageActions(Table attachmentsTable,
                                         Reference<WriteBatch> writeBatch, 
                                         Reference<SnapshotReader> snapshot, 
                                         IUuidGenerator uuidGenerator, 
                                         TableStorage tableStorage,
                                         Raven.Storage.Voron.TransactionalStorage transactionalStorage, 
                                         IBufferPool bufferPool)
            :base(snapshot, bufferPool)
        {
            this.attachmentsTable = attachmentsTable;
            this.writeBatch = writeBatch;
            this.uuidGenerator = uuidGenerator;
            this.tableStorage = tableStorage;
            this.transactionalStorage = transactionalStorage;

            metadataIndex = tableStorage.Attachments.GetIndex(Tables.Attachments.Indices.Metadata);
        }
开发者ID:j2jensen,项目名称:ravendb,代码行数:17,代码来源:AttachmentsStorageActions.cs

示例8: DocumentsStorageActions

		public DocumentsStorageActions(IUuidGenerator uuidGenerator,
			OrderedPartCollection<AbstractDocumentCodec> documentCodecs,
			IDocumentCacher documentCacher,
			Reference<WriteBatch> writeBatch,
			Reference<SnapshotReader> snapshot,
            TableStorage tableStorage, 
            IBufferPool bufferPool)
			: base(snapshot, bufferPool)
		{
			this.uuidGenerator = uuidGenerator;
			this.documentCodecs = documentCodecs;
			this.documentCacher = documentCacher;
			this.writeBatch = writeBatch;
			this.tableStorage = tableStorage;

			metadataIndex = tableStorage.Documents.GetIndex(Tables.Documents.Indices.Metadata);
		}
开发者ID:cocytus,项目名称:ravendb,代码行数:17,代码来源:DocumentsStorageActions.cs

示例9: Update

		public override void Update(TableStorage tableStorage, Action<string> output)
		{
			using (var tx = tableStorage.Environment.NewTransaction(TransactionFlags.ReadWrite))
			{
				var lists = tx.ReadTree(Tables.Lists.TableName);

				var iterator = lists.Iterate();

				if (iterator.Seek(Slice.BeforeAllKeys))
				{
					do
					{
						var result = lists.Read(iterator.CurrentKey);

						using (var stream = result.Reader.AsStream())
						{
							var listItem = stream.ToJObject();

							if (listItem.ContainsKey("createdAt"))
								continue;
							
							listItem.Add("createdAt", SystemTime.UtcNow);

							using (var streamValue = new MemoryStream())
							{
								listItem.WriteTo(streamValue);
								streamValue.Position = 0;

								lists.Add(iterator.CurrentKey, streamValue);
							}
						}

					} while (iterator.MoveNext());
				}

				tx.Commit();
			}

			UpdateSchemaVersion(tableStorage, output);
		}
开发者ID:GorelH,项目名称:ravendb,代码行数:40,代码来源:From10To11.cs

示例10: CreateDocumentReferencesSchema

		private static void CreateDocumentReferencesSchema(Transaction tx, TableStorage storage)
		{
			storage.Environment.CreateTree(tx, Tables.DocumentReferences.TableName);
			storage.Environment.CreateTree(tx, storage.DocumentReferences.GetIndexKey(Tables.DocumentReferences.Indices.ByRef));
			storage.Environment.CreateTree(tx, storage.DocumentReferences.GetIndexKey(Tables.DocumentReferences.Indices.ByView));
			storage.Environment.CreateTree(tx, storage.DocumentReferences.GetIndexKey(Tables.DocumentReferences.Indices.ByViewAndKey));
			storage.Environment.CreateTree(tx, storage.DocumentReferences.GetIndexKey(Tables.DocumentReferences.Indices.ByKey));
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:8,代码来源:SchemaCreator.cs

示例11: CreateMappedResultsSchema

		private static void CreateMappedResultsSchema(Transaction tx, TableStorage storage)
		{
			storage.Environment.CreateTree(tx, Tables.MappedResults.TableName);
			storage.Environment.CreateTree(tx, storage.MappedResults.GetIndexKey(Tables.MappedResults.Indices.ByView));
			storage.Environment.CreateTree(tx, storage.MappedResults.GetIndexKey(Tables.MappedResults.Indices.ByViewAndDocumentId));
			storage.Environment.CreateTree(tx, storage.MappedResults.GetIndexKey(Tables.MappedResults.Indices.ByViewAndReduceKey));
			storage.Environment.CreateTree(tx, storage.MappedResults.GetIndexKey(Tables.MappedResults.Indices.ByViewAndReduceKeyAndSourceBucket));
			storage.Environment.CreateTree(tx, storage.MappedResults.GetIndexKey(Tables.MappedResults.Indices.Data));
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:9,代码来源:SchemaCreator.cs

示例12: CreateReduceKeyTypesSchema

		private static void CreateReduceKeyTypesSchema(Transaction tx, TableStorage storage)
		{
			storage.Environment.CreateTree(tx, Tables.ReduceKeyTypes.TableName);
			storage.Environment.CreateTree(tx, storage.ReduceKeyTypes.GetIndexKey(Tables.ReduceKeyCounts.Indices.ByView));
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:5,代码来源:SchemaCreator.cs

示例13: CreateGeneralSchema

		private static void CreateGeneralSchema(Transaction tx, TableStorage storage)
		{
			storage.Environment.CreateTree(tx, Tables.General.TableName);
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:4,代码来源:SchemaCreator.cs

示例14: CreateScheduledReductionsSchema

		private static void CreateScheduledReductionsSchema(Transaction tx, TableStorage storage)
		{
			storage.Environment.CreateTree(tx, Tables.ScheduledReductions.TableName);
			storage.Environment.CreateTree(tx, storage.ScheduledReductions.GetIndexKey(Tables.ScheduledReductions.Indices.ByView));
			storage.Environment.CreateTree(tx, storage.ScheduledReductions.GetIndexKey(Tables.ScheduledReductions.Indices.ByViewAndLevelAndReduceKey));
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:6,代码来源:SchemaCreator.cs

示例15: CreateStalenessSchema

		private static void CreateStalenessSchema(Transaction tx, TableStorage storage)
		{
		}
开发者ID:jrusbatch,项目名称:ravendb,代码行数:3,代码来源:SchemaCreator.cs


注:本文中的Raven.Database.Storage.Voron.Impl.TableStorage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。