//----------------------------------------------------------------------- // // Copyright (c) Microsoft. All rights reserved. // // // Implements interface ICTStore. // //----------------------------------------------------------------------- namespace Microsoft.CTStore { using System.Collections.Generic; using System.Threading.Tasks; /// /// CT Store interface /// public interface ICTStore { /// /// Create container /// /// Container name /// True of success Task CreateContainerAsync(string containerName); /// /// Delete container /// /// Container name /// True of success Task DeleteContainerAsync(string containerName); /// /// Execute operation async /// /// Table operation /// Consistency mode /// Operation result Task ExecuteOperationAsync(Operation operation, ConsistencyMode consistencyMode); /// /// Execute transaction async /// /// Table transaction /// Consistency mode /// List of operation results Task> ExecuteTransactionAsync(Transaction transaction, ConsistencyMode consistencyMode); /// /// Query object async /// /// Object entity /// Object table /// Partition key for entity /// Key for entity /// Object entity result. Returns null if entity does not exist. Task QueryObjectAsync(ObjectTable table, string partitionKey, string objectKey) where T : ObjectEntity, new(); /// /// Query partial object async /// /// Object entity /// Object table /// Partition key for entity /// Key for entity /// Object entity result. Returns null if entity does not exist. Task QueryPartialObjectAsync(ObjectTable table, string partitionKey, string objectKey) where T : ObjectEntity, new(); /// /// Query partial object async /// /// Object entity /// Object table /// Partition key for entity /// Key for entity /// Fields to query /// Object entity result. Returns null if entity does not exist. Task QueryPartialObjectAsync(ObjectTable table, string partitionKey, string objectKey, List fields) where T : ObjectEntity, new(); /// /// Query fixed object async /// /// Object entity /// Object table /// Partition key for entity /// Key for entity /// Object entity result. Returns null if entity does not exist. Task QueryObjectAsync(FixedObjectTable table, string partitionKey, string objectKey) where T : ObjectEntity, new(); /// /// Query count async /// /// Count table /// Partition key for entity /// Key for entity /// Count entity Task QueryCountAsync(CountTable table, string partitionKey, string countKey); /// /// Query feed item async /// /// Feed entity /// Feed table /// Partition key for feed /// Key for feed /// Item key for feed item /// Feed entity in feed Task QueryFeedItemAsync(FeedTable table, string partitionKey, string feedKey, string itemKey) where T : FeedEntity, new(); /// /// Query feed async /// /// Feed entity /// Feed table /// Partition key for feed /// Key for feed /// Feed cursor /// Feed count limit /// List of feed entities Task> QueryFeedAsync( FeedTable table, string partitionKey, string feedKey, string cursor, int limit) where T : FeedEntity, new(); /// /// Query rank feed item async /// /// Rank feed table /// Partition key for feed /// Key for feed /// Item key /// List of rank feed entities Task QueryRankFeedItemAsync( RankFeedTable table, string partitionKey, string feedKey, string itemKey); /// /// Query rank feed async /// /// Rank feed table /// Partition key for feed /// Key for feed /// Feed cursor /// Feed count limit /// List of rank feed entities Task> QueryRankFeedAsync( RankFeedTable table, string partitionKey, string feedKey, string cursor, int limit); /// /// Query rank feed in reverse async /// /// Rank feed table /// Partition key for feed /// Key for feed /// Feed cursor /// Feed count limit /// List of rank feed entities Task> QueryRankFeedReverseAsync( RankFeedTable table, string partitionKey, string feedKey, string cursor, int limit); /// /// Query rank feed by score async /// /// Rank feed table /// Partition key for feed /// Key for feed /// Start score /// End score /// List of rank feed entities Task> QueryRankFeedByScoreAsync( RankFeedTable table, string partitionKey, string feedKey, double startScore, double endScore); /// /// Query rank feed length /// /// Rank feed table /// Partition key for feed /// Key for feed /// Rank feed length Task QueryRankFeedLengthAsync( RankFeedTable table, string partitionKey, string feedKey); } }