Created
February 12, 2013 23:18
-
-
Save peschkaj/4774418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CorrugatedIron.Models.MapReduce.Inputs | |
{ | |
public static class RiakIndex | |
{ | |
private static string RiakKeysIndex = "$key"; | |
public static RiakIndexInput AllKeys(string bucket) | |
{ | |
string first = "\u0000"; | |
string last = char.ConvertFromUtf32(0x10FFFF); | |
return Keys(bucket, first, last); | |
} | |
public static RiakIndexInput Keys(string bucket, string start, string end) | |
{ | |
return new RiakBinIndexRangeInput(bucket, RiakKeysIndex, start, end); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CorrugatedIron.Extensions | |
{ | |
public static class StringExtensions | |
{ | |
private static List<string> magicStrings = new List<string> { "$key" }; | |
public static bool IsBinaryKey(this string value) | |
{ | |
return magicStrings.Contains(value) || value.EndsWith(RiakConstants.IndexSuffix.Binary); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment