Ejemplo n.º 1
0
        public void VersionRange_Range()
        {
            var range  = new BigtableVersionRange(1, 2);
            var filter = RowFilters.VersionRange(range);

            Assert.NotNull(filter.TimestampRangeFilter);
            Assert.Equal(1000, filter.TimestampRangeFilter.StartTimestampMicros);
            Assert.Equal(2000, filter.TimestampRangeFilter.EndTimestampMicros);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a <see cref="Mutation"/> which deletes cells from the specified column, optionally
 /// restricting the deletions to a given version range.
 /// </summary>
 /// <remarks>
 /// <para>
 /// Note that string is implicitly convertible to <see cref="BigtableByteString"/>,
 /// so <paramref name="columnQualifier"/> can be specified using a string as well and
 /// its UTF-8 representations will be used.
 /// </para>
 /// </remarks>
 /// <param name="familyName">
 /// The name of the family from which cells should be deleted.
 /// Must match `[-_.a-zA-Z0-9]+`
 /// </param>
 /// <param name="columnQualifier">
 /// The qualifier of the column from which cells should be deleted.
 /// Can be any byte string, including the empty string.
 /// </param>
 /// <param name="versionRange">
 /// [Optional] The range of versions within which cells should be deleted.
 /// If unspecified, all versions will be deleted.
 /// </param>
 /// <returns>The created Mutation instance.</returns>
 public static Mutation DeleteFromColumn(
     string familyName,
     BigtableByteString columnQualifier,
     BigtableVersionRange versionRange = null) =>
 new Mutation
 {
     DeleteFromColumn = new Mutation.Types.DeleteFromColumn
     {
         FamilyName      = Utilities.ValidateFamilyName(familyName),
         ColumnQualifier = columnQualifier.Value,
         TimeRange       = versionRange.ToTimestampRange()
     }
 };
 public void Equality()
 {
     var control = new BigtableVersionRange(0, 10);
     var equal   = new[]