예제 #1
0
        // [END bigtable_filters_limit_col_family_regex]

        // [START bigtable_filters_limit_col_qualifier_regex]
        /// <summary>
        /// /// Read using a qualifier 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 filterLimitColQualifierRegex(
            String projectId, String instanceId, String tableId)
        {
            // A filter that matches cells whose column qualifier satisfies the given regex
            RowFilter filter = RowFilters.ColumnQualifierRegex("connected_.*$");

            return(readFilter(projectId, instanceId, tableId, filter));
        }
예제 #2
0
        public void Condition()
        {
            var filter = RowFilters.Condition(
                RowFilters.ColumnQualifierRegex("last_name"),
                RowFilters.RowSample(0.5),
                RowFilters.FamilyNameExact("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.FamilyNameExact("address"), filter.Condition.FalseFilter);
        }
예제 #3
0
        public void ColumnQualifierRegex()
        {
            var filter = RowFilters.ColumnQualifierRegex("123");

            Assert.Equal(ByteString.CopyFromUtf8("123"), filter.ColumnQualifierRegexFilter);
        }