本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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));
}
示例13: CreateGeneralSchema
private static void CreateGeneralSchema(Transaction tx, TableStorage storage)
{
storage.Environment.CreateTree(tx, Tables.General.TableName);
}
示例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));
}
示例15: CreateStalenessSchema
private static void CreateStalenessSchema(Transaction tx, TableStorage storage)
{
}