Example #1
0
        public unsafe LazyStringValue GetDocumentId(Slice key)
        {
            var sepIdx = key.Content.IndexOf(SpecialChars.RecordSeparator);

            if (_tmpLazyStringInstance == null)
            {
                _tmpLazyStringInstance = new LazyStringValue(null, null, 0, _context);
            }
            _tmpLazyStringInstance.Renew(null, key.Content.Ptr, sepIdx, _context);
            return(_tmpLazyStringInstance);
        }
Example #2
0
        private LazyStringValue SetTimestampTag()
        {
            if (_tagPointer.Pointer == null)
            {
                return(null);
            }

            var lazyStringLen = BlittableJsonReaderBase.ReadVariableSizeInt(_tagPointer.Pointer, 0, out var offset);

            _tag.Renew(null, _tagPointer.Pointer + offset, lazyStringLen);
            return(_tag);
        }