public static Slice[] PackRange <TKey, TElement>(this IFdbSubspace subspace, [NotNull] TElement[] elements, Func <TElement, TKey> selector)
 {
     return(FdbTuple.PackRange <TKey, TElement>(subspace.ToFoundationDbKey(), elements, selector));
 }
 public static Slice[] PackRange(this IFdbSubspace subspace, [NotNull] IEnumerable <IFdbTuple> tuples)
 {
     return(FdbTuple.PackRange(subspace.ToFoundationDbKey(), tuples));
 }
 public static Slice[] PackRange <T>(this IFdbSubspace subspace, [NotNull] T[] keys)
 {
     return(FdbTuple.PackRange <T>(subspace.ToFoundationDbKey(), keys));
 }
 /// <summary>Create a new key by appending three values to the current subspace</summary>
 /// <typeparam name="T1">Type of the first value</typeparam>
 /// <typeparam name="T2">Type of the second value</typeparam>
 /// <typeparam name="T3">Type of the third value</typeparam>
 /// <typeparam name="T4">Type of the fourth value</typeparam>
 /// <param name="key1">Value that will be appended first</param>
 /// <param name="key2">Value that will be appended second</param>
 /// <param name="key3">Value that will be appended third</param>
 /// <param name="key4">Value that will be appended fourth</param>
 /// <returns>Key the correspond to the concatenation of the current subspace's prefix, <paramref name="key1"/>, <paramref name="key2"/>, <paramref name="key3"/> and <paramref name="key4"/></returns>
 /// <example>tuple.Pack(w, x, y, z) is equivalent to tuple.Append(w).Append(x).Append(y).Append(z).ToSlice()</example>
 public static Slice Pack <T1, T2, T3, T4>(this IFdbSubspace subspace, T1 key1, T2 key2, T3 key3, T4 key4)
 {
     return(FdbTuple.PackWithPrefix <T1, T2, T3, T4>(subspace.ToFoundationDbKey(), key1, key2, key3, key4));
 }
 public static Slice[] PackRange(this IFdbSubspace subspace, params IFdbTuple[] tuples)
 {
     return(FdbTuple.PackRange(subspace.ToFoundationDbKey(), tuples));
 }
 /// <summary>Create a new key by appending a value to the current subspace</summary>
 /// <param name="item">Value that will be appended at the end of the key</param>
 /// <returns>Key the correspond to the concatenation of the current subspace's prefix and <paramref name="item"/></returns>
 /// <example>tuple.PackBoxed(x) is the non-generic equivalent of tuple.Pack&lt;object&gt;(tuple)</example>
 public static Slice PackBoxed(this IFdbSubspace subspace, object item)
 {
     return(FdbTuple.PackBoxedWithPrefix(subspace.ToFoundationDbKey(), item));
 }
 /// <summary>Create a new key by appending a value to the current subspace</summary>
 /// <typeparam name="T">Type of the value</typeparam>
 /// <param name="key">Value that will be appended at the end of the key</param>
 /// <returns>Key the correspond to the concatenation of the current subspace's prefix and <paramref name="key"/></returns>
 /// <example>tuple.Pack(x) is equivalent to tuple.Append(x).ToSlice()</example>
 public static Slice Pack <T>(this IFdbSubspace subspace, T key)
 {
     return(FdbTuple.PackWithPrefix <T>(subspace.ToFoundationDbKey(), key));
 }
 public static IFdbTuple Append <T1, T2, T3, T4>(this IFdbSubspace subspace, T1 value1, T2 value2, T3 value3, T4 value4)
 {
     return(new FdbPrefixedTuple(subspace.ToFoundationDbKey(), FdbTuple.Create <T1, T2, T3, T4>(value1, value2, value3, value4)));
 }
 /// <summary>Create a new key by appending a formattable object to the current subspace</summary>
 /// <param name="tuple">Tuple to pack (can be empty)</param>
 /// <returns>Key the correspond to the concatenation of the current subspace's prefix and the packed representation of <paramref name="tuple"/></returns>
 public static Slice Pack(this IFdbSubspace subspace, IFdbTuple tuple)
 {
     return(FdbTuple.PackWithPrefix(subspace.ToFoundationDbKey(), tuple));
 }
 public static IFdbTuple AppendBoxed(this IFdbSubspace subspace, object value)
 {
     return(new FdbPrefixedTuple(subspace.ToFoundationDbKey(), FdbTuple.CreateBoxed(value)));
 }
 public static IFdbTuple Append <T>(this IFdbSubspace subspace, T value)
 {
     return(new FdbPrefixedTuple(subspace.ToFoundationDbKey(), FdbTuple.Create <T>(value)));
 }
 public static IFdbTuple Append(this IFdbSubspace subspace, IFdbTuple tuple)
 {
     return(new FdbPrefixedTuple(subspace.ToFoundationDbKey(), tuple));
 }
 public static IFdbTuple ToTuple(this IFdbSubspace subspace)
 {
     return(new FdbPrefixedTuple(subspace.ToFoundationDbKey(), FdbTuple.Empty));
 }
 public static FdbSubspace Partition <T1, T2, T3, T4>(this IFdbSubspace subspace, T1 value1, T2 value2, T3 value3, T4 value4)
 {
     //TODO: this should go into a FdbTupleSubspace, because it collides with FdbEncoderSubspace<T1, T2, T3, T4> !
     return(new FdbSubspace(FdbTuple.PackWithPrefix(subspace.ToFoundationDbKey(), new FdbTuple <T1, T2, T3, T4>(value1, value2, value3, value4))));
 }
 public static FdbSubspace Partition <T>(this IFdbSubspace subspace, T value)
 {
     //TODO: this should go into a FdbTupleSubspace, because it collides with FdbEncoderSubspace<T> !
     return(new FdbSubspace(FdbTuple.PackWithPrefix <T>(subspace.ToFoundationDbKey(), value)));
 }
 /// <summary>Append a key to the subspace key</summary>
 public static Slice Concat(this IFdbSubspace subspace, Slice key)
 {
     return(Slice.Concat(subspace.ToFoundationDbKey(), key));
 }