Beispiel #1
0
        public void Write(DocumentTableRow document)
        {
            foreach (var field in document.Fields)
            {
                if (!_keyIndex.ContainsKey(field.Key))
                {
                    var keyId = _fieldNames.Count;

                    _fieldNames.Add(field.Key);
                    _keyIndex.Add(field.Key, (short)keyId);
                }
            }

            var tableRow = document.ToDocumentTableRow(_keyIndex);

            BlockInfo adr = _docWriter.Write(tableRow);

            _addressWriter.Write(adr);

            new DocHash(document.Hash).Serialize(_docHashesStream);

            _docWriter.Flush();
        }
Beispiel #2
0
        public void Write(DocumentTableRow document, IWriteSession session)
        {
            session.Write(document);

            Log.DebugFormat("stored doc ID {0}", document.TableId);
        }