Beispiel #1
0
 protected override async Task DeleteAsync(SnapshotMetadata metadata)
 {
     await _bigtableClient.MutateRowAsync(
         _tableName,
         GetRowKey(metadata.PersistenceId, metadata.SequenceNr),
         new List <Mutation> {
         Mutations.DeleteFromRow()
     }).ConfigureAwait(false);
 }
Beispiel #2
0
        /// <summary>Snippet for MutateRowAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MutateRow1ResourceNamesAsync()
        {
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            TableName              tableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]");
            ByteString             rowKey    = ByteString.Empty;
            IEnumerable <Mutation> mutations = new Mutation[] { new Mutation(), };
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(tableName, rowKey, mutations);
        }
        /// <summary>Snippet for MutateRowAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MutateRow1Async()
        {
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            string                 tableName = "projects/[PROJECT]/instances/[INSTANCE]/tables/[TABLE]";
            ByteString             rowKey    = ByteString.Empty;
            IEnumerable <Mutation> mutations = new Mutation[] { new Mutation(), };
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(tableName, rowKey, mutations);
        }
        /// <summary>Snippet for MutateRowAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task MutateRowRequestObjectAsync()
        {
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            MutateRowRequest request = new MutateRowRequest
            {
                TableNameAsTableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]"),
                RowKey       = ByteString.Empty,
                Mutations    = { new Mutation(), },
                AppProfileId = "",
            };
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(request);
        }
        public async Task MutateRowAsync()
        {
            // Snippet: MutateRowAsync(string,ByteString,IEnumerable<Mutation>,CallSettings)
            // Additional: MutateRowAsync(string,ByteString,IEnumerable<Mutation>,CancellationToken)
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            string                 formattedTableName = new TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString();
            ByteString             rowKey             = ByteString.CopyFromUtf8("");
            IEnumerable <Mutation> mutations          = new List <Mutation>();
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(formattedTableName, rowKey, mutations);

            // End snippet
        }
Beispiel #6
0
        /// <summary>Snippet for MutateRowAsync</summary>
        public async Task MutateRow2ResourceNamesAsync()
        {
            // Snippet: MutateRowAsync(TableName, ByteString, IEnumerable<Mutation>, string, CallSettings)
            // Additional: MutateRowAsync(TableName, ByteString, IEnumerable<Mutation>, string, CancellationToken)
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            TableName              tableName = TableName.FromProjectInstanceTable("[PROJECT]", "[INSTANCE]", "[TABLE]");
            ByteString             rowKey    = ByteString.Empty;
            IEnumerable <Mutation> mutations = new Mutation[] { new Mutation(), };
            string appProfileId = "";
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(tableName, rowKey, mutations, appProfileId);

            // End snippet
        }
        public async Task MutateRowAsync_RequestObject()
        {
            // Snippet: MutateRowAsync(MutateRowRequest,CallSettings)
            // Create client
            BigtableClient bigtableClient = await BigtableClient.CreateAsync();

            // Initialize request argument(s)
            MutateRowRequest request = new MutateRowRequest
            {
                TableName = new TableName("[PROJECT]", "[INSTANCE]", "[TABLE]").ToString(),
                RowKey    = ByteString.CopyFromUtf8(""),
                Mutations = { },
            };
            // Make the request
            MutateRowResponse response = await bigtableClient.MutateRowAsync(request);

            // End snippet
        }