示例#1
0
            public static bool Decode(StringPiece slice, out IndexMetaDataKey result)
            {
                KeyPrefix prefix;
                byte      typeByte;

                if (!KeyPrefix.Decode(slice, out prefix) || !slice.DecodeByte(out typeByte))
                {
                    result = default(IndexMetaDataKey);
                    return(false);
                }

                result = new IndexMetaDataKey();
                return(slice.DecodeVarInt(out result.ObjectStoreId) &&
                       slice.DecodeVarInt(out result.IndexId) &&
                       slice.DecodeByte(out result.MetaDataTypeValue));
            }
示例#2
0
            public static bool Decode(StringPiece slice, out ObjectStoreNamesKey result)
            {
                KeyPrefix prefix;
                byte      typeByte;

                if (!KeyPrefix.Decode(slice, out prefix) || !slice.DecodeByte(out typeByte))
                {
                    result = default(ObjectStoreNamesKey);
                    return(false);
                }

                result = new ObjectStoreNamesKey();
                return(slice.DecodeStringWithLength(out result._objectStoreName));
            }
示例#3
0
            public static bool Decode(StringPiece slice, out DatabaseFreeListKey result)
            {
                KeyPrefix prefix;
                byte      typeByte;

                if (!KeyPrefix.Decode(slice, out prefix) || !slice.DecodeByte(out typeByte))
                {
                    result = default(DatabaseFreeListKey);
                    return(false);
                }

                result = new DatabaseFreeListKey();
                return(slice.DecodeVarInt(out result.DatabaseId));
            }
示例#4
0
            public static bool Decode(StringPiece slice, out DatabaseNameKey result)
            {
                KeyPrefix prefix;
                byte      typeByte;

                if (!KeyPrefix.Decode(slice, out prefix) || !slice.DecodeByte(out typeByte))
                {
                    result = default(DatabaseNameKey);
                    return(false);
                }

                result = new DatabaseNameKey();
                return(slice.DecodeStringWithLength(out result.Origin) && slice.DecodeStringWithLength(out result.DatabaseName));
            }
示例#5
0
            public static bool Decode(StringPiece slice, out IndexNamesKey result)
            {
                KeyPrefix prefix;
                byte      typeByte;

                if (!KeyPrefix.Decode(slice, out prefix) || !slice.DecodeByte(out typeByte))
                {
                    result = default;
                    return(false);
                }

                result = new IndexNamesKey();
                return(slice.DecodeVarInt(out result.ObjectStoreId) && slice.DecodeStringWithLength(out result.IndexName));
            }
示例#6
0
            public static bool Decode(StringPiece slice, out ObjectStoreMetaDataKey result)
            {
                KeyPrefix prefix;

                if (!KeyPrefix.Decode(slice, out prefix))
                {
                    result = default(ObjectStoreMetaDataKey);
                    return(false);
                }

                if (slice.Empty)
                {
                    result = default(ObjectStoreMetaDataKey);
                    return(false);
                }

                slice.Next();

                result = new ObjectStoreMetaDataKey();
                return(slice.DecodeVarInt(out result.ObjectStoreId) && slice.DecodeByte(out result.MetaDataTypeValue));
            }