コード例 #1
0
        public static FdbRangeQuery <KeyValuePair <Slice, Slice> > GetRangeStartsWith(this IFdbReadOnlyTransaction trans, [NotNull] IFdbSubspace subspace, FdbRangeOptions options = null)
        {
            //REVIEW: should we remove this method?
            Contract.Requires(trans != null && subspace != null);

            return(trans.GetRange(FdbKeyRange.StartsWith(subspace.ToFoundationDbKey()), options));
        }
コード例 #2
0
        /// <summary>Clear the entire content of a subspace</summary>
        public static void ClearRange(this IFdbTransaction trans, [NotNull] IFdbSubspace subspace)
        {
            Contract.Requires(trans != null && subspace != null);

            //BUGBUG: should we call subspace.ToRange() ?
            trans.ClearRange(FdbKeyRange.StartsWith(subspace.ToFoundationDbKey()));
        }
コード例 #3
0
 public virtual FdbKeyRange ToRange <TKey>(TKey key)
     where TKey : IFdbKey
 {
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     return(FdbKeyRange.StartsWith(ConcatKey(key.ToFoundationDbKey())));
 }
コード例 #4
0
        /// <summary>Create a new pair of key selectors that will select all the keys that start with the specified prefix</summary>
        public static FdbKeySelectorPair StartsWith(Slice prefix)
        {
            var range = FdbKeyRange.StartsWith(prefix);

            return(new FdbKeySelectorPair(
                       FdbKeySelector.FirstGreaterOrEqual(range.Begin),
                       FdbKeySelector.FirstGreaterOrEqual(range.End)
                       ));
        }
コード例 #5
0
        public static FdbRangeQuery <KeyValuePair <Slice, Slice> > GetRangeStartsWith(this IFdbReadOnlyTransaction trans, [NotNull] FdbSubspace subspace, FdbRangeOptions options = null)
        {
            Contract.Requires(trans != null && subspace != null);

            return(trans.GetRange(FdbKeyRange.StartsWith(subspace.Key), options));
        }
コード例 #6
0
        /// <summary>Clear the entire content of a subspace</summary>
        public static void ClearRange(this IFdbTransaction trans, [NotNull] FdbSubspace subspace)
        {
            Contract.Requires(trans != null && subspace != null);

            trans.ClearRange(FdbKeyRange.StartsWith(subspace.Key));
        }
コード例 #7
0
 public virtual FdbKeyRange ToRange(Slice suffix)
 {
     return(FdbKeyRange.StartsWith(ConcatKey(suffix)));
 }
コード例 #8
0
 public virtual FdbKeyRange ToRange(Slice prefix)
 {
     return(FdbKeyRange.StartsWith(prefix));
 }