Beispiel #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));
        }
Beispiel #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()));
        }
 public virtual FdbKeyRange ToRange <TKey>(TKey key)
     where TKey : IFdbKey
 {
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     return(FdbKeyRange.StartsWith(ConcatKey(key.ToFoundationDbKey())));
 }
        /// <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)
                       ));
        }
        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));
        }
        /// <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));
        }
 public virtual FdbKeyRange ToRange(Slice suffix)
 {
     return(FdbKeyRange.StartsWith(ConcatKey(suffix)));
 }
Beispiel #8
0
 public virtual FdbKeyRange ToRange(Slice prefix)
 {
     return(FdbKeyRange.StartsWith(prefix));
 }