Ejemplo n.º 1
0
        // [END bigtable_filters_limit_cells_per_row_offset]

        // [START bigtable_filters_limit_col_family_regex]
        /// <summary>
        /// /// Read using a family regex filter from an existing table.
        ///</summary>
        /// <param name="projectId">Your Google Cloud Project ID.</param>
        /// <param name="instanceId">Your Google Cloud Bigtable Instance ID.</param>
        /// <param name="tableId">Your Google Cloud Bigtable table ID.</param>

        public string filterLimitColFamilyRegex(
            String projectId, String instanceId, String tableId)
        {
            // A filter that matches cells whose column family satisfies the given regex
            RowFilter filter = RowFilters.FamilyNameRegex("stats_.*$");

            return(readFilter(projectId, instanceId, tableId, filter));
        }
Ejemplo n.º 2
0
        public static async Task HasNoValuesAsync(
            BigtableClient client,
            TableName tableName,
            BigtableByteString rowKey,
            string familyName = null)
        {
            var filter = familyName == null
                ? RowFilters.PassAllFilter()
                : RowFilters.FamilyNameRegex(familyName);

            Assert.Null(await client.ReadRowAsync(tableName, rowKey, filter));
        }
Ejemplo n.º 3
0
        public void Condition()
        {
            var filter = RowFilters.Condition(
                RowFilters.ColumnQualifierRegex("last_name"),
                RowFilters.RowSample(0.5),
                RowFilters.FamilyNameRegex("address"));

            Assert.NotNull(filter.Condition);
            Assert.Equal(
                RowFilters.ColumnQualifierRegex("last_name"),
                filter.Condition.PredicateFilter);
            Assert.Equal(RowFilters.RowSample(0.5), filter.Condition.TrueFilter);
            Assert.Equal(RowFilters.FamilyNameRegex("address"), filter.Condition.FalseFilter);
        }
Ejemplo n.º 4
0
 public void FamilyNameRegex_Validations()
 {
     Assert.Throws <ArgumentNullException>(() => RowFilters.FamilyNameRegex(null));
 }
Ejemplo n.º 5
0
        public void FamilyNameRegex()
        {
            var filter = RowFilters.FamilyNameRegex("abc");

            Assert.Equal("abc", filter.FamilyNameRegexFilter);
        }