Esempio n. 1
0
        public async Task <BigFamily> UpdateFamilyAsync(string tableName, string familyName, RetentionPolicy policy)
        {
            var columnFamily = policy.ToColumnFamilyPrototype();

            columnFamily.Name = familyName.ToFamilyId(ClusterId, tableName);
            var response = await _client.UpdateColumnFamilyAsync(columnFamily);

            await Task.Yield();

            return(new BigFamily(response, tableName.ToTableId(ClusterId)));
        }
Esempio n. 2
0
        public async Task <BigFamily> CreateFamilyAsync(string tableName, string name, RetentionPolicy policy)
        {
            var tableId = tableName.ToTableId(ClusterId);
            var request = new CreateColumnFamilyRequest
            {
                Name           = tableId,
                ColumnFamilyId = name,
                ColumnFamily   = policy.ToColumnFamilyPrototype()
            };

            var response = await _client.CreateColumnFamilyAsync(request);

            await Task.Yield();

            return(new BigFamily(response, tableId));
        }