public static async Task HasNoValuesAsync( BigtableClient client, TableName tableName, BigtableByteString rowKey) { Assert.Null(await client.ReadRowAsync(tableName, rowKey)); }
public static async Task HasNoValuesAsync( BigtableClient client, TableName tableName, BigtableByteString rowKey, string familyName = null) { var filter = familyName == null ? RowFilters.PassAllFilter() : RowFilters.FamilyNameExact(familyName); Assert.Null(await client.ReadRowAsync(tableName, rowKey, filter)); }
public static async Task HasSingleValueAsync( BigtableClient client, TableName tableName, BigtableByteString rowKey, string familyName, BigtableByteString columnQualifier, BigtableByteString value, BigtableVersion?version = null) { var row = await client.ReadRowAsync(tableName, rowKey); Assert.Equal(rowKey.Value, row.Key); HasSingleValue(row, familyName, columnQualifier, value, version); }
private static async Task <bool> HasValueHelperAsync( BigtableClient client, TableName tableName, BigtableByteString rowKey, string familyName, BigtableByteString columnQualifier, BigtableByteString value, BigtableVersion?version) { var row = await client.ReadRowAsync(tableName, rowKey); Assert.Equal(rowKey.Value, row.Key); var cells = row .Families.SingleOrDefault(f => f.Name == familyName) ?.Columns.SingleOrDefault(c => c.Qualifier == columnQualifier) ?.Cells; var cell = version != null ? cells?.SingleOrDefault(c => c.TimestampMicros == version.Value.Micros) : cells?.SingleOrDefault(); return(cell != null && cell.Value == value); }